Revert "Making Client Revocation Headless and Documenting New Feature"
This reverts commit b8bdb1a56b.
This commit is contained in:
parent
43966b9e25
commit
7486e3a2e4
2 changed files with 9 additions and 24 deletions
13
README.md
13
README.md
|
|
@ -77,19 +77,6 @@ Other variables can be set depending on your choice (encryption, compression). Y
|
||||||
|
|
||||||
Password-protected clients are not supported by the headless installation method since user input is expected by Easy-RSA.
|
Password-protected clients are not supported by the headless installation method since user input is expected by Easy-RSA.
|
||||||
|
|
||||||
### Headless User Removal
|
|
||||||
|
|
||||||
The removal of an existing user can also be fully automated. Again, the key is to provide the (string) value of the `MENU_OPTION` variable along with the remaining mandatory variables before invoking the script.
|
|
||||||
|
|
||||||
The following Bash script removes the existing user `bar` from an OpenVPN configuration
|
|
||||||
```bash
|
|
||||||
#!/bin/bash
|
|
||||||
export MENU_OPTION="2"
|
|
||||||
export CLIENT="bar"
|
|
||||||
./openvpn-install.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Installs and configures a ready-to-use OpenVPN server
|
- Installs and configures a ready-to-use OpenVPN server
|
||||||
|
|
|
||||||
|
|
@ -1072,7 +1072,6 @@ function revokeClient () {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
until [[ "$CLIENT" =~ ^[a-zA-Z0-9_]+$ ]]; do
|
|
||||||
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 ') '
|
||||||
|
|
@ -1083,7 +1082,6 @@ function revokeClient () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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)
|
||||||
done
|
|
||||||
cd /etc/openvpn/easy-rsa/
|
cd /etc/openvpn/easy-rsa/
|
||||||
./easyrsa --batch revoke "$CLIENT"
|
./easyrsa --batch revoke "$CLIENT"
|
||||||
EASYRSA_CRL_DAYS=3650 ./easyrsa gen-crl
|
EASYRSA_CRL_DAYS=3650 ./easyrsa gen-crl
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue