about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-15 18:28:20 -0400
committerJune McEnroe <june@causal.agency>2020-08-15 18:28:20 -0400
commit8b9daf7d5db20b822fb87e2f42027cde8b38bb36 (patch)
tree8b7418b7f8538688bb0eb3b7c4d71d90dc230f9d
parentAdd reset interval after which restart interval is reset (diff)
downloadcatsit-8b9daf7d5db20b822fb87e2f42027cde8b38bb36.tar.gz
catsit-8b9daf7d5db20b822fb87e2f42027cde8b38bb36.zip
Fix resetting restart interval with explicit restart
-rw-r--r--service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/service.c b/service.c
index fef9b00..9b156f2 100644
--- a/service.c
+++ b/service.c
@@ -217,8 +217,8 @@ void serviceStop(struct Service *service) {
 }
 
 void serviceRestart(struct Service *service) {
+	service->intent = Restart;
 	if (service->state == Start) {
-		service->intent = Restart;
 		serviceSignal(service, SIGTERM);
 	} else {
 		serviceStart(service);