-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart.sh
More file actions
25 lines (21 loc) · 746 Bytes
/
start.sh
File metadata and controls
25 lines (21 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
mkernelurl=http://links.puppetlabs.com/razor-microkernel-latest.tar
mkerneltar=`basename $mkernelurl`
repodir=/var/lib/razor/repo-store
# Setup the postgres DB if it hasnt been.
if [[ ! -x /etc/init.d/postgresql-9.2 ]]; then
mkdir -p /var/lib/pgsql/9.2 2>/dev/null
puppet apply /root/install.pp
sed -i -e 's/razor_prd/razor/' -e 's/mypass/ef1aiSh8/g' /etc/razor/config.yaml
cd /opt/razor
jruby bin/razor-admin -e production migrate-database
torquebox deploy --env production
fi
# Install the Razor Microkernel, if it hasnt yet.
if [[ ! -e $repodir/microkernel/vmlinuz0 ]]; then
cd $repodir
curl -LO $mkernelurl
tar xfva $mkerneltar
fi
/etc/init.d/postgresql-9.2 start && \
torquebox run --bind-address=0.0.0.0