updated start/stop scripts to run form /etc/rc.local (without sudo)
authorJoseph Snow <josephsnow@gmail.com>
Tue, 15 Nov 2011 16:21:10 +0000 (09:21 -0700)
committerJoseph Snow <josephsnow@gmail.com>
Tue, 15 Nov 2011 16:21:10 +0000 (09:21 -0700)
stop

diff --git a/stop b/stop
index 59e64920324aef708c3e8ed2355cd5d508838dee..371b8ce0c0b743be629adfcac442726d7effdf0c 100755 (executable)
--- a/stop
+++ b/stop
@@ -3,7 +3,9 @@
 ps waux | grep node | grep -v grep
 
 echo "stopping ..."
-sudo forever stopall
+if [ "$(id -u)" != "0" ]; then
+       sudo forever stopall
+fi
 forever stopall
 
 sleep 3