]> arthur.barton.de Git - netdata.git/commitdiff
Let systemd handle killing the processes
authorMichael Johnson <nightexcessive@users.noreply.github.com>
Sun, 8 May 2016 16:10:46 +0000 (12:10 -0400)
committerMichael Johnson <nightexcessive@users.noreply.github.com>
Sun, 8 May 2016 16:10:46 +0000 (12:10 -0400)
By setting `KillMode` to `mixed`, systemd will send `KillSignal` to the main process. It will then wait `TimeoutStopSec` and then send `SIGKILL` to all processes in the cgroup. This appears to be the desired behavior.

system/netdata.service.in

index bc26cc9dcc83aec3df4adcf5e062af9f098cde3f..91db6122d8c6a0f8d2ede7f43bdc7c92ebf62aaa 100644 (file)
@@ -9,7 +9,8 @@ User=root
 Group=root
 PIDFile=@localstatedir_POST@/run/netdata.pid
 ExecStart=@sbindir_POST@/netdata -pidfile @localstatedir_POST@/run/netdata.pid
-ExecStop=/bin/kill -SIGTERM $MAINPID
+KillMode=mixed
+KillSignal=SIGTERM
 TimeoutStopSec=30
 
 [Install]