laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29298 )
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory
(or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it
to 'osmocom' subdir of state directory
(/var/lib for system instance) instead.
Related: OS#4821
Change-Id: If21e3471ec129892ff8b410db30d8ce0e4014e05
---
M contrib/systemd/osmo-stp.service
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/contrib/systemd/osmo-stp.service b/contrib/systemd/osmo-stp.service
index 87b414b..79394fa 100644
--- a/contrib/systemd/osmo-stp.service
+++ b/contrib/systemd/osmo-stp.service
@@ -5,6 +5,8 @@
[Service]
Type=simple
Restart=always
+StateDirectory=osmocom
+WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-stp -c /etc/osmocom/osmo-stp.cfg
RestartSec=2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29298
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If21e3471ec129892ff8b410db30d8ce0e4014e05
Gerrit-Change-Number: 29298
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29298 )
Change subject: Set working directory in systemd service file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29298
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If21e3471ec129892ff8b410db30d8ce0e4014e05
Gerrit-Change-Number: 29298
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Sep 2022 07:23:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment