1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update 15-openvpn

This commit is contained in:
A Holt 2018-09-05 11:48:54 -04:00 committed by GitHub
parent 82e26e6a4f
commit ef507172e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
#!/bin/bash
# Not really used as of August 2018, but perhaps can be revived for CentOS etc
# Not used as of August 2018: parent service "openvpn" reliably auto-starts child servive "openpn@xscenet" on OS's in common use
# But could be revived for older CentOS etc?
export LC_ALL=C
@ -15,6 +16,10 @@ if [ "$2" = "up" ]; then
/sbin/ip route list dev "$1" | grep -q '^default' &&
# restart the services
systemctl -q is-enabled openvpn@xscenet.service && /usr/lib/iiab/up_wan
# CONSIDER THIS INSTEAD:
# systemctl is-enabled openvpn && pgrep openvpn && systemctl start openvpn@xscenet
# OR EQUIVALENTLY:
# systemctl is-enabled openvpn && systemctl is-active openvpn && systemctl start openvpn@xscenet
fi
# we added this to prevent logs from filling with openvpn errors