Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mark Jordan
ojs_vagrant
Commits
5f56c96b
Commit
5f56c96b
authored
May 06, 2015
by
Mark Jordan
Browse files
Cleaned up some copypasta cruft.
parent
eb307829
Changes
3
Hide whitespace changes
Inline
Side-by-side
Vagrantfile
View file @
5f56c96b
...
...
@@ -21,6 +21,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
shared_dir
=
"/vagrant"
config
.
vm
.
provision
:shell
,
path:
"./scripts/setup.sh"
,
:args
=>
shared_dir
config
.
vm
.
provision
:shell
,
path:
"./scripts/ojs.sh"
,
:args
=>
shared_dir
config
.
vm
.
provision
:shell
,
path:
"./scripts/setup.sh"
config
.
vm
.
provision
:shell
,
path:
"./scripts/ojs.sh"
end
scripts/ojs.sh
View file @
5f56c96b
echo
"Installing OJS"
SHARED_DIR
=
$1
if
[
-f
"
$SHARED_DIR
/config"
]
;
then
.
$SHARED_DIR
/config
fi
# Set up the OJS database
echo
"CREATE DATABASE ojs"
| mysql
-uroot
-pojs
echo
"CREATE USER 'ojs'@'localhost' IDENTIFIED BY 'ojs'"
| mysql
-uroot
-pojs
...
...
scripts/setup.sh
View file @
5f56c96b
###
# BASICS
###
SHARED_DIR
=
$1
if
[
-f
"
$SHARED_DIR
/config"
]
;
then
.
$SHARED_DIR
/config
fi
if
[
!
-d
"
$DOWNLOAD_DIR
"
]
;
then
mkdir
-p
$DOWNLOAD_DIR
fi
cd
$HOME_DIR
if
[
!
-d
"
$HOME_DIR
/git"
]
;
then
mkdir
git
fi
# Update
# Update Ubuntu
apt-get
-y
update
&&
apt-get
-y
upgrade
# Install some useful stuff
apt-get
-y
install
openssh-server
apt-get
-y
install
git vim
apt-get
-y
install
wget curl
apt-get
-y
install
openssh-server git vim wget curl
# Set some params to automate the MySQL install
debconf-set-selections
<<<
'mysql-server mysql-server/root_password password ojs'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment