Skip to content

Commit

Permalink
add support for revoke by number
Browse files Browse the repository at this point in the history
  • Loading branch information
MParvin committed Jan 18, 2024
1 parent 873d5d5 commit f9d6e0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,9 @@ function revokeClient() {
fi
done
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
elif [[ -z $1 || $1 =~ ^[0-9]+$ ]]; then
CLIENTNUMBER=$1
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
else
CLIENT=$1
fi
Expand Down

0 comments on commit f9d6e0a

Please sign in to comment.