Disable and stop OpenVPN upon removal

This commit is contained in:
angristan 2018-09-23 14:32:24 +02:00
parent 7f35106687
commit 8de3957afb
1 changed files with 5 additions and 0 deletions

View File

@ -1009,8 +1009,13 @@ function removeOpenVPN () {
# Stop OpenVPN
if [[ "$OS" = 'fedora' ]]; then
systemctl disable openvpn-server@server
systemctl stop openvpn-server@server
elif [[ "$OS" == 'debian' ]] && [[ "$VERSION_ID" == "16.04" ]]; then
systemctl disable openvpn
systemctl stop openvpn
else
systemctl disable openvpn@server
systemctl stop openvpn@server
fi