mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-23 21:46:08 +03:00
Added a confirmation dialog before removing
This commit is contained in:
parent
135db489b7
commit
98b39e7354
@ -101,6 +101,9 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
|
echo ""
|
||||||
|
read -p "Do you really want to remove OpenVPN? [y/n]: " -e -i n REMOVE
|
||||||
|
if [[ "$REMOVE" = 'y' ]]; then
|
||||||
apt-get remove --purge -y openvpn openvpn-blacklist
|
apt-get remove --purge -y openvpn openvpn-blacklist
|
||||||
rm -rf /etc/openvpn
|
rm -rf /etc/openvpn
|
||||||
rm -rf /usr/share/doc/openvpn
|
rm -rf /usr/share/doc/openvpn
|
||||||
@ -108,6 +111,7 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
sed -i '/iptables -t nat -A POSTROUTING -s 10.8.0.0/d' /etc/rc.local
|
sed -i '/iptables -t nat -A POSTROUTING -s 10.8.0.0/d' /etc/rc.local
|
||||||
echo ""
|
echo ""
|
||||||
echo "OpenVPN removed!"
|
echo "OpenVPN removed!"
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
4) exit;;
|
4) exit;;
|
||||||
|
Loading…
Reference in New Issue
Block a user