salix/env.sh

22 lines
476 B
Bash
Raw Normal View History

#!/bin/bash
nginxDir="${PWD}/services/nginx"
case "$1" in
start|"")
forever start forever.json
forever list
/usr/sbin/nginx -c "$nginxDir/conf-dev.conf" -p "$nginxDir"
cd @salix && gulp
;;
stop)
forever stopall
forever list
/usr/sbin/nginx -c "$nginxDir/conf-dev.conf" -p "$nginxDir" -s stop
cd @salix && gulp clean
;;
*)
echo "Usage: `basename "$0"` [start|stop]"
exit 1
esac