Add vpnclient checker timer and upgrade backups, to enable Bram to sleep better
This commit is contained in:
8
conf/ynh-vpnclient-checker.service
Normal file
8
conf/ynh-vpnclient-checker.service
Normal 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
|
7
conf/ynh-vpnclient-checker.sh
Normal file
7
conf/ynh-vpnclient-checker.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! ip link show tun0 &> /dev/null; then
|
||||
systemctl restart ynh-vpnclient &> /dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
8
conf/ynh-vpnclient-checker.timer
Normal file
8
conf/ynh-vpnclient-checker.timer
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Run VPN Client Checker every 5 minutes.
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=5min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user