From def090cdec56b47ea446884087241291bc909143 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 30 Jul 2020 20:40:02 +0800 Subject: [PATCH] Update README.md --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c8dff8c..e5b7a6c 100644 --- a/README.md +++ b/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