From 26d45e734cc866d170bfbd98a9cd343fa8850cd9 Mon Sep 17 00:00:00 2001 From: Nathan Rijksen Date: Wed, 23 Apr 2014 10:05:50 -0700 Subject: [PATCH] Fixed status running under wrong user --- daemon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon b/daemon index e647188..c364994 100755 --- a/daemon +++ b/daemon @@ -12,10 +12,10 @@ USER="nathanr" case "$1" in start) su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever start $DAEMON_PATH/server.js" + $0 status ;; status) - source ~/.nvm/nvm.sh - $DAEMON_PATH/node_modules/forever/bin/forever list + su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever list" ;; stop) su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever stop $DAEMON_PATH/server.js"