From d39e253cd099e51bd7836bbea601e0f237fedf7b Mon Sep 17 00:00:00 2001 From: Jerome Leonard Date: Mon, 28 Nov 2016 13:44:27 +0100 Subject: [PATCH] #29 add RuntimeDirectory to automatically create /var/run/thehive at start --- install/thehive.service | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install/thehive.service b/install/thehive.service index a4329efcf4..baee3b740f 100644 --- a/install/thehive.service +++ b/install/thehive.service @@ -5,15 +5,19 @@ Wants=network-online.target After=network-online.target [Service] +Environment=PID_DIR=/var/run/thehive WorkingDirectory=/opt/thehive + User=thehive Group=thehive -ExecStart=/opt/thehive/bin/thehive \ - -Dconfig.file=/etc/thehive/application.conf \ - -Dhttp.port=9000 \ - -Dpidfile.path=/opt/thehive/RUNNING_PID +RuntimeDirectory=thehive +RuntimeDirectoryMode=0750 +ExecStart=/opt/thehive/bin/thehive \ + -Dconfig.file=/etc/thehive/application.conf \ + -Dhttp.port=9000 \ + -Dpidfile.path=${PID_DIR}/pid StandardOutput=journal StandardError=inherit