Update start_site.sh and init_web.sh

This commit is contained in:
BoHung Chiu 2022-04-07 11:42:17 +08:00
parent da582d4f95
commit de94765169
2 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
sudo service nginx restart && sudo service mongod restart && ./start_site.sh $1 && curl localhost
sudo service nginx restart && sudo service mongod restart && ./start_site.sh $1 $2 $3 $4 && curl localhost

View File

@ -1,5 +1,9 @@
rails_env=$1
if [ -z $rails_env ]; then
rails_env=development
rails_env=development
fi
bundle exec unicorn_rails -c config/unicorn.rb -D -E $rails_env
daemon_args=""
if [[ "$2" != "-ND" ]]; then
daemon_args="-D"
fi
bundle exec unicorn_rails -c config/unicorn.rb -E $rails_env $daemon_args $3 "$4"