mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-20 02:04:13 +00:00
Add fsctl command to summon reincarnation
If you start freeswitch with -reincarnate or -reincarnate-reexec, FS will restart automatically in the event of an unexpected exit. Currently, you can cause FS to immediately call exit(0) with `fsctl shutdown now`, or you can have it call abort() with `fsctl crash`. Which are both nice, but if you have reincarnation engaged, you really might want FS to call exit([non-zero]) so the great supervisor immediately breathes life back into your system. This is now available via `fsctl shutdown reincarnate now`.
This commit is contained in:
1 parent
d94e393480
commit
03202e3017
3 files changed
+10
No files matched your search
@@ -2268,6 +2268,10 @@ SWITCH_STANDARD_API(ctl_function)
|
||||
command = SCSC_SHUTDOWN_NOW;
|
||||
} else if (!strcasecmp(argv[x], "asap")) {
|
||||
command = SCSC_SHUTDOWN_ASAP;
|
||||
} else if (!strcasecmp(argv[x], "reincarnate")
|
||||
&& (x+1 < argc) && argv[x+1] && !strcasecmp(argv[x+1], "now")) {
|
||||
++x;
|
||||
command = SCSC_REINCARNATE_NOW;
|
||||
} else if (!strcasecmp(argv[x], "restart")) {
|
||||
arg = 1;
|
||||
}
|
||||
@@ -6746,6 +6750,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
|
||||
switch_console_set_complete("add fsctl shutdown cancel");
|
||||
switch_console_set_complete("add fsctl shutdown elegant");
|
||||
switch_console_set_complete("add fsctl shutdown elegant restart");
|
||||
switch_console_set_complete("add fsctl shutdown reincarnate now");
|
||||
switch_console_set_complete("add fsctl shutdown restart");
|
||||
switch_console_set_complete("add fsctl shutdown restart asap");
|
||||
switch_console_set_complete("add fsctl shutdown restart elegant");
|
||||
|
||||
Reference in new issue
Block a user