mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-11 18:01:57 +02:00
Support for reloading nodebb via the nodebb executable
This commit is contained in:
@@ -41,6 +41,7 @@ Loader.init = function(callback) {
|
||||
}
|
||||
|
||||
process.on('SIGHUP', Loader.restart);
|
||||
process.on('SIGUSR2', Loader.reload);
|
||||
callback();
|
||||
};
|
||||
|
||||
|
||||
13
nodebb
13
nodebb
@@ -43,7 +43,7 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
|
||||
reload|restart)
|
||||
restart)
|
||||
pidExists;
|
||||
if [ 0 -eq $? ];
|
||||
then
|
||||
@@ -54,6 +54,17 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
|
||||
reload)
|
||||
pidExists;
|
||||
if [ 0 -eq $? ];
|
||||
then
|
||||
echo "NodeBB could not be reloaded, as a running instance could not be found.";
|
||||
else
|
||||
echo "Reloading NodeBB.";
|
||||
kill -12 $(cat pidfile);
|
||||
fi
|
||||
;;
|
||||
|
||||
status)
|
||||
pidExists;
|
||||
if [ 0 -eq $? ];
|
||||
|
||||
Reference in New Issue
Block a user