From 64ccc0f5893db66f8dfa8fe2fcdbf75aab68db12 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 9 May 2019 09:39:25 -0400 Subject: [PATCH] update for pid usage --- Installation Files/requirements-os.sh | 5 +++++ System-Files/Config/SpiceBotSERV.cfg | 1 + System-Files/systemd/SpiceBotSERV.service | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Installation Files/requirements-os.sh b/Installation Files/requirements-os.sh index 47e988a..31f9763 100644 --- a/Installation Files/requirements-os.sh +++ b/Installation Files/requirements-os.sh @@ -35,6 +35,11 @@ git clone https://github.com/SpiceBot/SpiceBot.git /home/sopel/SpiceBot cd /home/sopel/SpiceBot git checkout dev +mkdir /run/sopel +echo $$ > /run/sopel/sopel-SpiceBotSERV.pid +chmod -R 777 /run/sopel/ + + cp /home/sopel/SpiceBot/System-Files/Config/SpiceBot.cfg /home/sopel/SpiceBot.cfg cp /home/sopel/SpiceBot/System-Files/systemd/SpiceBot.service /lib/systemd/system/SpiceBot.service systemctl enable SpiceBot.service diff --git a/System-Files/Config/SpiceBotSERV.cfg b/System-Files/Config/SpiceBotSERV.cfg index c6651a5..b7f64e6 100644 --- a/System-Files/Config/SpiceBotSERV.cfg +++ b/System-Files/Config/SpiceBotSERV.cfg @@ -13,4 +13,5 @@ channels = #spicebot prefix = \.|! homedir = /home/sopel/.sopel/ db_filename = /home/sopel/.sopel/SpiceBot.db +pid_dir = /run/sopel extra = diff --git a/System-Files/systemd/SpiceBotSERV.service b/System-Files/systemd/SpiceBotSERV.service index 7a17cb7..6adb8ce 100644 --- a/System-Files/systemd/SpiceBotSERV.service +++ b/System-Files/systemd/SpiceBotSERV.service @@ -6,7 +6,7 @@ After=network.target [Service] Type=simple User=sopel -PIDFile=/run/sopel/sopel-sopel.pid +PIDFile=/run/sopel/sopel-SpiceBotSERV.pid ExecStart=/usr/local/bin/sopel -c /home/sopel/.sopel/SpiceBot.cfg Restart=on-failure RestartPreventExitStatus=2