osmith submitted this change.
contrib/systemd: use StateDirectory
Adjust the systemd service to be more similar to other Osmocom
projects, by using StateDirectory. This directory gets created by
systemd, so remove the ExecStartPre=/usr/bin/mkdir line.
Related: https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html
Change-Id: I83c7749ca1277b71e25c41b4dc943e83608bd442
---
M contrib/systemd/osmo-epdg.service
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/contrib/systemd/osmo-epdg.service b/contrib/systemd/osmo-epdg.service
index 48ced12..40318c1 100644
--- a/contrib/systemd/osmo-epdg.service
+++ b/contrib/systemd/osmo-epdg.service
@@ -6,10 +6,10 @@
[Service]
Type=simple
Restart=always
-WorkingDirectory=/var/lib/osmo-epdg
+StateDirectory=osmo-epdg
+WorkingDirectory=%S/osmo-epdg
Environment="ERL_FLAGS=-config /etc/osmocom/osmo-epdg.config"
ExecStartPre=-/usr/bin/ip link del gtp0
-ExecStartPre=/usr/bin/mkdir -p /var/lib/osmo-epdg
ExecStart=/usr/bin/osmo-epdg
RestartSec=2
To view, visit change 36943. To unsubscribe, or for help writing mail filters, visit settings.