Improve VPN setup
- Remove add/delete user helper scripts during VPN uninstall.
This commit is contained in:
parent
e8c738d6af
commit
be02488fcd
@ -168,12 +168,13 @@ remove_xl2tpd() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_ikev2_script() {
|
remove_helper_scripts() {
|
||||||
bigecho "Removing IKEv2 script..."
|
bigecho "Removing helper scripts..."
|
||||||
if [ "$(readlink -f /usr/bin/ikev2.sh 2>/dev/null)" = "/opt/src/ikev2.sh" ]; then
|
for sc in ikev2.sh addvpnuser.sh delvpnuser.sh; do
|
||||||
/bin/rm -f /usr/bin/ikev2.sh
|
if [ "$(readlink -f "/usr/bin/$sc" 2>/dev/null)" = "/opt/src/$sc" ]; then
|
||||||
|
/bin/rm -f "/usr/bin/$sc" "/opt/src/$sc"
|
||||||
fi
|
fi
|
||||||
/bin/rm -f /opt/src/ikev2.sh
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
update_sysctl() {
|
update_sysctl() {
|
||||||
@ -302,7 +303,7 @@ remove_vpn() {
|
|||||||
stop_services
|
stop_services
|
||||||
remove_ipsec
|
remove_ipsec
|
||||||
remove_xl2tpd
|
remove_xl2tpd
|
||||||
remove_ikev2_script
|
remove_helper_scripts
|
||||||
update_sysctl
|
update_sysctl
|
||||||
update_rclocal
|
update_rclocal
|
||||||
update_iptables_rules
|
update_iptables_rules
|
||||||
|
Loading…
x
Reference in New Issue
Block a user