]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Notify systemd after we are really stopped
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 26 Apr 2021 09:02:58 +0000 (12:02 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 26 Apr 2021 11:22:19 +0000 (14:22 +0300)
src/master/main.c

index 9325a27b1f547327c3a53b94665d7303cef72b53..0e257a27e52390aea006f075a5a00bccc185f734 100644 (file)
@@ -467,7 +467,6 @@ static void sig_die(const siginfo_t *si, void *context ATTR_UNUSED)
        services->destroying = TRUE;
        i_sd_notify(0, "STOPPING=1\nSTATUS=Dovecot stopping...");
        master_service_stop(master_service);
-       i_sd_notify(0, "STATUS=Dovecot stopped");
 }
 
 static struct master_settings *master_settings_read(void)
@@ -593,6 +592,8 @@ static void main_deinit(void)
 
        service_anvil_global_deinit();
        service_pids_deinit();
+       /* notify systemd that we are done */
+       i_sd_notify(0, "STATUS=Dovecot stopped");
 }
 
 static const char *get_full_config_path(struct service_list *list)