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:
parent
82e26e6a4f
commit
ef507172e3
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue