From 06479aa5f1a5a89205c400afadb081f76ed37a84 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 12 Oct 2017 01:07:09 +0200 Subject: [PATCH] Remove reconf condition when .conf reload completes Signed-off-by: Joachim Nilsson --- src/cond-w.c | 7 ++++++- src/sm.c | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cond-w.c b/src/cond-w.c index 89456ca3..65b59312 100644 --- a/src/cond-w.c +++ b/src/cond-w.c @@ -148,7 +148,12 @@ static int reassert(const char *fpath, const struct stat *sb, int tflg, struct F */ void cond_reassert(const char *type) { - _d("%s", type); + _d("%s", type ?: "reload done"); + if (!type) { + cond_clear(COND_RECONF); + return; + } + nftw(cond_path(type), reassert, 20, FTW_DEPTH); } diff --git a/src/sm.c b/src/sm.c index c066a94b..7ccc25ff 100644 --- a/src/sm.c +++ b/src/sm.c @@ -230,6 +230,9 @@ restart: _d("Calling reconf hooks ..."); plugin_run_hooks(HOOK_SVC_RECONF); + /* Done, lift reconf condition */ + cond_reassert(NULL); + service_step_all(SVC_TYPE_SERVICE | SVC_TYPE_INETD); _d("Reconfiguration done");