From 95d08e5aeb4ed538871c0768a16661d354a80a7b Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 11 Apr 2022 04:44:35 -0400 Subject: [PATCH] Preserve runtime directory in systemd services --- systemd/matrix-appservice-kakaotalk-node.service | 1 + systemd/matrix-appservice-kakaotalk.service | 1 + 2 files changed, 2 insertions(+) diff --git a/systemd/matrix-appservice-kakaotalk-node.service b/systemd/matrix-appservice-kakaotalk-node.service index 4106c97..a96c7af 100644 --- a/systemd/matrix-appservice-kakaotalk-node.service +++ b/systemd/matrix-appservice-kakaotalk-node.service @@ -10,6 +10,7 @@ NotifyAccess=all WorkingDirectory=/opt/matrix-appservice-kakaotalk/node ConfigurationDirectory=matrix-appservice-kakaotalk RuntimeDirectory=matrix-appservice-kakaotalk +RuntimeDirectoryPreserve=yes ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json Restart=on-failure RestartSec=3 diff --git a/systemd/matrix-appservice-kakaotalk.service b/systemd/matrix-appservice-kakaotalk.service index d50b498..428b88b 100644 --- a/systemd/matrix-appservice-kakaotalk.service +++ b/systemd/matrix-appservice-kakaotalk.service @@ -8,6 +8,7 @@ After=multi-user.target network.target WorkingDirectory=/opt/matrix-appservice-kakaotalk ConfigurationDirectory=matrix-appservice-kakaotalk RuntimeDirectory=matrix-appservice-kakaotalk +RuntimeDirectoryPreserve=yes ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml Restart=on-failure RestartSec=3