28 lines
698 B
Bash
Executable File
28 lines
698 B
Bash
Executable File
#!/bin/bash
|
|
|
|
nginxBin="/usr/sbin/nginx"
|
|
nginxPrefix="${PWD}/services/nginx"
|
|
nginxConf="$nginxPrefix/conf-dev.conf"
|
|
|
|
if [ ! -f $nginxBin ]; then
|
|
nginxBin="nginx"
|
|
fi
|
|
|
|
case "$1" in
|
|
start|"")
|
|
$0 stop
|
|
echo "################################ Starting services"
|
|
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix"
|
|
forever --minUptime 1000 --spinSleepTime 1000 start forever.json
|
|
gulp --gulpfile @salix/gulpfile.js
|
|
;;
|
|
stop)
|
|
echo "################################ Stoping services"
|
|
forever stopall
|
|
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop
|
|
;;
|
|
*)
|
|
echo "Usage: `basename "$0"` [start|stop]"
|
|
exit 1
|
|
esac
|