Skip to content
Snippets Groups Projects
Commit 7e25a530 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't restart openvpn if it's not installed

parent 5ce7c214
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment