Add vpnclient checker timer and upgrade backups, to enable Bram to sleep better

This commit is contained in:
Julien Vaubourg
2016-08-14 21:05:16 +02:00
parent 093249b94e
commit 453fababef
6 changed files with 44 additions and 12 deletions

View File

@@ -0,0 +1,8 @@
[Unit]
Description=YunoHost VPN Client Checker.
Requires=ynh-vpnclient.service
After=ynh-vpnclient.service
[Service]
Type=simple
ExecStart=/usr/local/bin/ynh-vpnclient-checker.sh

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if ! ip link show tun0 &> /dev/null; then
systemctl restart ynh-vpnclient &> /dev/null
fi
exit 0

View File

@@ -0,0 +1,8 @@
[Unit]
Description=Run VPN Client Checker every 5 minutes.
[Timer]
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target