From 7769a4f6e94452719e09b8f0c3a1ecca09b55355 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 15 Dec 2020 16:47:12 -0500 Subject: Log a message when stopping a service waiting to restart It's a little annoying to have to special-case this, but otherwise there is no confirmation in the log that the restart won't still happen. --- service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service.c b/service.c index 4aaad54..6718b06 100644 --- a/service.c +++ b/service.c @@ -270,6 +270,9 @@ void serviceSignal(struct Service *service, int signal) { } void serviceStop(struct Service *service) { + if (service->intent != Stop && service->state != Start) { + syslog(LOG_NOTICE, "%s[] stopped", service->name); + } service->intent = Stop; serviceSignal(service, SIGTERM); } -- cgit 1.4.1