From 62626aef7f7e842b56631fd9ab1d78baff8f6a35 Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Tue, 19 Sep 2017 20:36:13 +0200 Subject: [PATCH] Adjust service restart and shutdown behavior Explicitly set control-group kill mode, that is: try SIGTERM first, and use SIGKILL after a timeout. This exactly defines how bees is running as a child process within the frontend service starter. Not sure if bees cares about signals but SIGTERM first seems cleaner. On the way, let bees restart on abnormal termination. --- scripts/beesd@.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/beesd@.service b/scripts/beesd@.service index 920295e..54fc187 100644 --- a/scripts/beesd@.service +++ b/scripts/beesd@.service @@ -6,7 +6,10 @@ After=local-fs.target Type=simple ExecStart=/usr/sbin/beesd %i Nice=19 +KillMode=control-group +KillSignal=SIGTERM IOSchedulingClass=idle +Restart=on-abnormal CPUAccounting=true MemoryAccounting=true # CPUQuota=95%