diff options
Diffstat (limited to 'conf/conf.c')
-rw-r--r-- | conf/conf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/conf/conf.c b/conf/conf.c index d6b3e8e8..0b797dec 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -492,19 +492,24 @@ config_init(void) * for switching to an empty configuration. */ void -order_shutdown(void) +order_shutdown(int gr) { struct config *c; if (shutting_down) return; - log(L_INFO "Shutting down"); + if (!gr) + log(L_INFO "Shutting down"); + else + log(L_INFO "Shutting down for graceful restart"); + c = lp_alloc(config->mem, sizeof(struct config)); memcpy(c, config, sizeof(struct config)); init_list(&c->protos); init_list(&c->tables); c->shutdown = 1; + c->gr_down = gr; config_commit(c, RECONFIG_HARD, 0); shutting_down = 1; |