From: Joseph Snow Date: Tue, 15 Nov 2011 16:21:10 +0000 (-0700) Subject: updated start/stop scripts to run form /etc/rc.local (without sudo) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5d33f2fb4e49f6bfd6f14a6577178c88eb33d0fd;p=oweals%2Ffinalsclub.git updated start/stop scripts to run form /etc/rc.local (without sudo) --- diff --git a/stop b/stop index 59e6492..371b8ce 100755 --- 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