osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36943?usp=email )
Change subject: contrib/systemd: use StateDirectory ......................................................................
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(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg refs/changes/43/36943/1
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