|
|
@ -33,13 +33,25 @@ case "$1" in
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
stop)
|
|
|
|
stop)
|
|
|
|
echo "Stopping NodeBB. Goodbye!";
|
|
|
|
pidExists;
|
|
|
|
kill $(cat pidfile);
|
|
|
|
if [ 0 -eq $? ];
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
echo "NodeBB is already stopped.";
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Stopping NodeBB. Goodbye!";
|
|
|
|
|
|
|
|
kill $(cat pidfile);
|
|
|
|
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
reload|restart)
|
|
|
|
reload|restart)
|
|
|
|
echo "Restarting NodeBB.";
|
|
|
|
pidExists;
|
|
|
|
kill -1 $(cat pidfile);
|
|
|
|
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)
|
|
|
|
status)
|
|
|
|