init: Let systemd restart daemons if they get terminated unexpectedly
authorTobias Brunner <tobias@strongswan.org>
Wed, 18 Jan 2017 12:54:56 +0000 (13:54 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 25 Jan 2017 14:10:57 +0000 (15:10 +0100)
Fixes #2205.

init/systemd-swanctl/strongswan-swanctl.service.in
init/systemd/strongswan.service.in

index 1b865af..e53c0c6 100644 (file)
@@ -7,6 +7,7 @@ Type=notify
 ExecStart=@SBINDIR@/charon-systemd
 ExecStartPost=@SBINDIR@/swanctl --load-all --noprompt
 ExecReload=@SBINDIR@/swanctl --reload
+Restart=on-abnormal
 
 [Install]
 WantedBy=multi-user.target
index 0bb9d54..474284a 100644 (file)
@@ -5,6 +5,7 @@ After=syslog.target network-online.target
 [Service]
 ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
 StandardOutput=syslog
+Restart=on-abnormal
 
 [Install]
 WantedBy=multi-user.target