diff options
author | June McEnroe <june@causal.agency> | 2020-08-15 17:50:19 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-15 17:50:19 -0400 |
commit | a2c5773b0392cd2d98386a09c5c8a726af25ed87 (patch) | |
tree | cbb45d7ab0545f9e8f707e0f9e423fb3942f5805 /daemon.c | |
parent | Add FreeBSD rc script (diff) | |
download | catsit-a2c5773b0392cd2d98386a09c5c8a726af25ed87.tar.gz catsit-a2c5773b0392cd2d98386a09c5c8a726af25ed87.zip |
Log when service name pattern doesn't match
Diffstat (limited to 'daemon.c')
-rw-r--r-- | daemon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/daemon.c b/daemon.c index 3fff805..3cfe24f 100644 --- a/daemon.c +++ b/daemon.c @@ -148,6 +148,7 @@ static void parseControl(char *command) { } while (command) { + bool found = false; char *pattern = strsep(&command, WS); for (size_t i = 0; i < services.len; ++i) { struct Service *service = &services.ptr[i]; @@ -157,7 +158,9 @@ static void parseControl(char *command) { } else { fn(service); } + found = true; } + if (!found) syslog(LOG_NOTICE, "no services matching %s", pattern); } } |