more graceful handling of missing pidfile, #1395

v1.18.x
Julian Lam 11 years ago
parent 20d1723e84
commit d95398f808

@ -33,13 +33,25 @@ case "$1" in
;;
stop)
pidExists;
if [ 0 -eq $? ];
then
echo "NodeBB is already stopped.";
else
echo "Stopping NodeBB. Goodbye!";
kill $(cat pidfile);
fi
;;
reload|restart)
pidExists;
if [ 0 -eq $? ];
then
echo "NodeBB could not be restarted, as a running instance could not be found.";
else
echo "Restarting NodeBB.";
kill -1 $(cat pidfile);
fi
;;
status)

Loading…
Cancel
Save