2017-05-27 18:09:50 +00:00
|
|
|
#!/bin/bash
|
2018-09-05 15:54:43 +00:00
|
|
|
# Not used as of August 2018: parent service "openvpn" reliably auto-starts child service "openpn@xscenet" on OS's in common use
|
2018-09-05 15:49:18 +00:00
|
|
|
# But could be revived for older CentOS etc?
|
2018-08-16 01:30:36 +00:00
|
|
|
|
|
|
|
# If the wan has recently come up, see if we need to start openvpn
|
|
|
|
|
2017-05-27 18:09:50 +00:00
|
|
|
systemctl is-enabled openvpn
|
|
|
|
if [ $? -eq 0 ]; then
|
2018-08-15 18:15:19 +00:00
|
|
|
pgrep openvpn
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
systemctl start openvpn@xscenet
|
|
|
|
fi
|
2017-05-27 18:09:50 +00:00
|
|
|
fi
|