diff --git a/src/sig.c b/src/sig.c index e71c87dd..b532fcf4 100644 --- a/src/sig.c +++ b/src/sig.c @@ -318,9 +318,8 @@ void do_shutdown(shutop_t op) do_iterate_proc(kill_cb, &signo); } - /* Exit plugins and API gracefully */ + /* Exit plugins gracefully */ plugin_exit(); - api_exit(); /* We can no longer act on conditions, activate script runner */ cond_exit(); diff --git a/src/sm.c b/src/sm.c index 1e6cabe6..1effeb38 100644 --- a/src/sm.c +++ b/src/sm.c @@ -150,6 +150,7 @@ restart: /* Restore terse mode and run hooks before shutdown */ if (runlevel == 0 || runlevel == 6) { + api_exit(); log_exit(); plugin_run_hooks(HOOK_SHUTDOWN); }