about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-02-07 15:19:21 +0100
committerLeah Neukirchen <leah@vuxu.org>2024-02-07 15:19:21 +0100
commit928b5972963ac9ca8e1f054aca13bced2971cd05 (patch)
tree4956ddf77a7a47f27876a12879a56b1848387509
parent5f98314624326955a22a168c7caf23d35979d8e1 (diff)
downloadnitro-928b5972963ac9ca8e1f054aca13bced2971cd05.tar.gz
nitro-928b5972963ac9ca8e1f054aca13bced2971cd05.tar.xz
nitro-928b5972963ac9ca8e1f054aca13bced2971cd05.zip
check log/down
This is not really useful, but let's be consistent.
-rw-r--r--nitro.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nitro.c b/nitro.c
index 6139cb9..d4d22ef 100644
--- a/nitro.c
+++ b/nitro.c
@@ -885,6 +885,12 @@ rescan(int first)
 		if (stat_slash(name, "log", &st) == 0 && S_ISDIR(st.st_mode)) {
 			int j = add_service(buf);
 			services[j].islog = 1;
+
+			if (first && stat_slash(buf, "down", &st) == 0) {
+				services[j].state = PROC_DOWN;
+				services[j].timeout = 0;
+			}
+
 			if (services[j].logpipe[0] == -1) {
 				if (pipe(services[i].logpipe) < 0) {
 					prn(2, "- nitro: can't create log pipe: errno=%d\n", errno);