summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-15 17:50:19 -0400
committerJune McEnroe <june@causal.agency>2020-08-15 17:50:19 -0400
commita2c5773b0392cd2d98386a09c5c8a726af25ed87 (patch)
treecbb45d7ab0545f9e8f707e0f9e423fb3942f5805
parentAdd FreeBSD rc script (diff)
downloadcatsit-a2c5773b0392cd2d98386a09c5c8a726af25ed87.tar.gz
catsit-a2c5773b0392cd2d98386a09c5c8a726af25ed87.zip
Log when service name pattern doesn't match
Diffstat (limited to '')
-rw-r--r--daemon.c3
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);
 	}
 }