From 7a75e34808213a18c8796c48f9fe70133edd6643 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 9 Feb 2025 20:06:38 +0100 Subject: [PATCH] Fix `initctl touch` of template services Follow-up to 465bc17, which addressed unintended restart of siblings. This patch fixes a problem where template instantiated services are not properly reloaded/restarted when marked as "dirty" with `initctl touch`. Signed-off-by: Joachim Wiberg --- src/conf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 531923c0..908bc919 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1486,7 +1486,11 @@ int conf_changed(char *file) if (!file) return 0; - rp = realpath(file, NULL); + if (strchr(file, '@')) + rp = strdup(file); + else + rp = realpath(file, NULL); + if (!rp) return 0;