salix/dev.sh

28 lines
691 B
Bash
Raw Normal View History

#!/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"
2017-01-18 17:07:16 +00:00
forever --minUptime 1000 --spinSleepTime 1000 start forever.json
gulp --gulpfile gulpfile.js
;;
stop)
echo "################################ Stoping services"
forever stopall
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop
;;
*)
echo "Usage: `basename "$0"` [start|stop]"
exit 1
esac