added daemon capability to ./nodebb start, npm start/stop scripts

This commit is contained in:
Julian Lam
2014-02-27 10:06:31 -05:00
parent 38e4a6c8b0
commit 5b301772bb
5 changed files with 77 additions and 22 deletions

14
nodebb
View File

@@ -6,7 +6,19 @@
case "$1" in
start)
node loader "$@"
echo "Starting NodeBB";
echo " \"./nodebb stop\" to stop the NodeBB server";
echo " \"./nodebb log\" to view server output";
node loader -d "$@"
;;
stop)
echo "Stopping NodeBB. Goodbye!";
kill `cat pidfile`;
;;
log)
tail -F ./logs/output.log;
;;
upgrade)