2016-11-18 13:12:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-11-23 10:44:33 +00:00
|
|
|
nginxBin="/usr/sbin/nginx"
|
|
|
|
nginxPrefix="${PWD}/services/nginx"
|
|
|
|
nginxConf="$nginxPrefix/conf-dev.conf"
|
|
|
|
|
|
|
|
if [ ! -f $nginxBin ]; then
|
|
|
|
nginxBin="nginx"
|
|
|
|
fi
|
2016-11-18 13:12:57 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start|"")
|
2016-11-23 10:44:33 +00:00
|
|
|
$0 stop
|
|
|
|
echo "################################ Starting services"
|
|
|
|
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix"
|
2017-01-18 17:07:16 +00:00
|
|
|
forever --minUptime 1000 --spinSleepTime 1000 start forever.json
|
2017-01-17 10:10:12 +00:00
|
|
|
gulp --gulpfile @salix/gulpfile.js
|
2016-11-18 13:12:57 +00:00
|
|
|
;;
|
|
|
|
stop)
|
2016-11-23 10:44:33 +00:00
|
|
|
echo "################################ Stoping services"
|
2016-11-18 13:12:57 +00:00
|
|
|
forever stopall
|
2016-11-23 10:44:33 +00:00
|
|
|
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop
|
2016-11-18 13:12:57 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: `basename "$0"` [start|stop]"
|
|
|
|
exit 1
|
|
|
|
esac
|