mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
more graceful handling of missing pidfile, #1395
This commit is contained in:
20
nodebb
20
nodebb
@@ -33,13 +33,25 @@ case "$1" in
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping NodeBB. Goodbye!";
|
||||
kill $(cat pidfile);
|
||||
pidExists;
|
||||
if [ 0 -eq $? ];
|
||||
then
|
||||
echo "NodeBB is already stopped.";
|
||||
else
|
||||
echo "Stopping NodeBB. Goodbye!";
|
||||
kill $(cat pidfile);
|
||||
fi
|
||||
;;
|
||||
|
||||
reload|restart)
|
||||
echo "Restarting NodeBB.";
|
||||
kill -1 $(cat pidfile);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user