Don't restart openvpn if it's not installed
This commit is contained in:
parent
5ce7c214d6
commit
7e25a5303e
|
@ -59,11 +59,17 @@ vpn_variables=(MY_EMAIL_ADDRESS
|
|||
VPN_TLS_PORT)
|
||||
|
||||
function logging_on_vpn {
|
||||
if [ ! -f /etc/openvpn/server.conf ]; then
|
||||
return
|
||||
fi
|
||||
sed -i 's|status .*|status /var/log/openvpn.log|g' /etc/openvpn/server.conf
|
||||
systemctl restart openvpn
|
||||
}
|
||||
|
||||
function logging_off_vpn {
|
||||
if [ ! -f /etc/openvpn/server.conf ]; then
|
||||
return
|
||||
fi
|
||||
sed -i 's|status .*|status /dev/null|g' /etc/openvpn/server.conf
|
||||
systemctl restart openvpn
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue