Project

General

Profile

Feature #2205

Updated by Tobias Brunner over 8 years ago

Hi,
I'm trying to feed back some of the Delta Ubuntu was carrying for a while to strongswan itself.
On the service file I think two things could be picked up:

# #1 really wait for network being up according to https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
#


#2
restart the service on failure according to https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=

A change would look like:

<pre><code class="diff">
--- a/init/systemd/strongswan.service.in
+++ b/init/systemd/strongswan.service.in
@@ -1,10 +1,11 @@
[Unit]
Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
-After=syslog.target network.target
+After=syslog.target network-online.target

[Service]
ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
StandardOutput=syslog
+Restart=on-failure

[Install]
WantedBy=multi-user.target
</code></pre>

Back