Added a confirmation dialog before removing

This commit is contained in:
Nyr 2015-01-21 03:03:14 +01:00
parent 135db489b7
commit 98b39e7354
1 changed files with 10 additions and 6 deletions

View File

@ -101,6 +101,9 @@ if [[ -e /etc/openvpn/server.conf ]]; then
exit
;;
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
rm -rf /etc/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
echo ""
echo "OpenVPN removed!"
fi
exit
;;
4) exit;;