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-05-05 10:54:47 +00:00
|
|
|
node dev.js
|
2016-11-18 13:12:57 +00:00
|
|
|
;;
|
|
|
|
stop)
|
2016-11-23 10:44:33 +00:00
|
|
|
echo "################################ Stoping services"
|
|
|
|
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop
|
2016-11-18 13:12:57 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: `basename "$0"` [start|stop]"
|
|
|
|
exit 1
|
|
|
|
esac
|