salix/dev.sh

26 lines
578 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-05-05 10:54:47 +00:00
node dev.js
;;
stop)
echo "################################ Stoping services"
"$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop
;;
*)
echo "Usage: `basename "$0"` [start|stop]"
exit 1
esac