mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-23 09:19:04 +01:00
parent
c758418c6d
commit
f411d9dec7
@ -1138,12 +1138,13 @@ function revokeClient() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Select the existing client certificate you want to revoke"
|
echo "Select the existing client certificate you want to revoke"
|
||||||
tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | nl -s ') '
|
tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | nl -s ') '
|
||||||
if [[ $NUMBEROFCLIENTS == '1' ]]; then
|
until [[ $CLIENTNUMBER -ge 1 && $CLIENTNUMBER -le $NUMBEROFCLIENTS ]]; do
|
||||||
|
if [[ $CLIENTNUMBER == '1' ]]; then
|
||||||
read -rp "Select one client [1]: " CLIENTNUMBER
|
read -rp "Select one client [1]: " CLIENTNUMBER
|
||||||
else
|
else
|
||||||
read -rp "Select one client [1-$NUMBEROFCLIENTS]: " CLIENTNUMBER
|
read -rp "Select one client [1-$NUMBEROFCLIENTS]: " CLIENTNUMBER
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
|
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
|
||||||
cd /etc/openvpn/easy-rsa/ || return
|
cd /etc/openvpn/easy-rsa/ || return
|
||||||
./easyrsa --batch revoke "$CLIENT"
|
./easyrsa --batch revoke "$CLIENT"
|
||||||
|
Loading…
Reference in New Issue
Block a user