Update README.md
This commit is contained in:
parent
a6a1592697
commit
def090cdec
10
README.md
10
README.md
|
@ -273,21 +273,15 @@ sig () {
|
|||
|
||||
get_orbit_root () {
|
||||
if [ ! -f $NGINX_ORBIT_SITES/$1 ]; then echo "Site $1 not found" && exit 0; fi
|
||||
ORBIT_ROOT=`cat $NGINX_ORBIT_SITES/$1 | grep 'root'`;
|
||||
ORBIT_ROOT=`cat $NGINX_ORBIT_SITES/$1 | grep 'root' | grep -v '#' | xargs | awk '{print $2}'`;
|
||||
ORBIT_ROOT=${ORBIT_ROOT//"/public;"/""};
|
||||
ORBIT_ROOT=${ORBIT_ROOT//"root"/""};
|
||||
ORBIT_ROOT=${ORBIT_ROOT//" "/""};
|
||||
if [ ! -d $ORBIT_ROOT ]; then echo "Site folder $ORBIT_ROOT not fount" && exit 0; fi
|
||||
}
|
||||
|
||||
start_orbit () {
|
||||
sig 0 $ORBIT_ROOT && echo >&2 "$ORBIT_ROOT Already running" && continue;
|
||||
if [ ! -d "$ORBIT_ROOT/public/assets" ]; then
|
||||
sudo su -l $ORBIT_USER -c "cd $ORBIT_ROOT && git fetch origin && git pull origin master && bundle"
|
||||
sudo su -l $ORBIT_USER -c "cd $ORBIT_ROOT && bundle exec rake assets:precompile RAILS_ENV=production"
|
||||
fi
|
||||
echo "Starting $ORBIT_ROOT";
|
||||
sudo su -l $ORBIT_USER -c "cd $ORBIT_ROOT && bundle exec unicorn_rails -D -E $RAILS_ENV -c $ORBIT_ROOT/config/unicorn.rb";
|
||||
sudo su -l $ORBIT_USER -c "cd $ORBIT_ROOT && bundle exec unicorn_rails -D -E $RAILS_ENV -c config/unicorn.rb";
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
|
Loading…
Reference in New Issue