1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-23 21:46:08 +03:00

Added option for client certificate revocation

This commit is contained in:
Nyr 2013-05-14 17:41:53 +02:00
parent 32aad09930
commit c0adc8c75b

View File

@ -43,10 +43,11 @@ if [ -e /etc/openvpn/server.conf ]; then
echo "What do you want to do?"
echo ""
echo "1) Add a cert for a new user"
echo "2) Remove OpenVPN"
echo "3) Exit"
echo "2) Revoke existing user cert"
echo "3) Remove OpenVPN"
echo "4) Exit"
echo ""
read -p "Select an option [1-3]:" option
read -p "Select an option [1-4]:" option
case $option in
1)
echo ""
@ -76,6 +77,16 @@ if [ -e /etc/openvpn/server.conf ]; then
exit
;;
2)
echo ""
echo "Tell me the existing client name"
read -p "Client name: " -e -i client CLIENT
. /etc/openvpn/easy-rsa/2.0/vars
. /etc/openvpn/easy-rsa/2.0/revoke-full $CLIENT
echo ""
echo "Certificate for client $CLIENT revoked"
exit
;;
3)
apt-get remove --purge -y openvpn openvpn-blacklist
rm -r /etc/openvpn
rm -r /usr/share/doc/openvpn
@ -85,7 +96,7 @@ if [ -e /etc/openvpn/server.conf ]; then
echo "OpenVPN removed!"
exit
;;
3) exit;;
4) exit;;
esac
done
else