From 2439e193579e034fe2bad3fb6f039a440d60c556 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 13 Aug 2019 16:27:13 -0400 Subject: [PATCH] Server restart via command no longer requires running as a daemon , uses execv() to restart. --- citadel/modules/ctdlproto/serv_syscmds.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/citadel/modules/ctdlproto/serv_syscmds.c b/citadel/modules/ctdlproto/serv_syscmds.c index 7341ad238..8783cc291 100644 --- a/citadel/modules/ctdlproto/serv_syscmds.c +++ b/citadel/modules/ctdlproto/serv_syscmds.c @@ -33,20 +33,12 @@ void cmd_down(char *argbuf) { int state = CIT_OK; restart_server = extract_int(argbuf, 0); - if (restart_server > 0) - { + if (restart_server > 0) { Reply = "%d citserver will now shut down and automatically restart.\n"; } - if ((restart_server > 0) && !running_as_daemon) - { - syslog(LOG_ERR, "The user requested restart, but not running as daemon! Geronimooooooo!\n"); - Reply = "%d Warning: citserver is not running in daemon mode and is therefore unlikely to restart automatically.\n"; - state = ERROR; - } cprintf(Reply, state); } - else - { + else { cprintf(Reply, CIT_OK + SERVER_SHUTTING_DOWN); } CC->kill_me = KILLME_SERVER_SHUTTING_DOWN; -- 2.30.2