Skip to content

Commit ff4159c

Browse files
committed
ensure daemon is only ran once
1 parent 26d45e7 commit ff4159c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

daemon

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ USER="nathanr"
1111

1212
case "$1" in
1313
start)
14-
su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever start $DAEMON_PATH/server.js"
15-
$0 status
14+
$0 restart
1615
;;
1716
status)
1817
su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever list"
@@ -23,7 +22,8 @@ stop)
2322

2423
restart)
2524
$0 stop
26-
$0 start
25+
su $USER -c "source ~/.nvm/nvm.sh && $DAEMON_PATH/node_modules/forever/bin/forever start $DAEMON_PATH/server.js"
26+
$0 status
2727
;;
2828

2929
*)

0 commit comments

Comments
 (0)