1
1
mirror of https://github.com/namibia/openvpn-install.git synced 2024-12-22 14:58:54 +00:00

Improve sed line deletion (#608)

This commit is contained in:
randomshell 2020-04-10 09:42:57 +00:00 committed by GitHub
parent ef5d5faf30
commit 2c9c0ed0c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1120,7 +1120,7 @@ function revokeClient () {
chmod 644 /etc/openvpn/crl.pem
find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete
rm -f "/root/$CLIENT.ovpn"
sed -i "s|^$CLIENT,.*||" /etc/openvpn/ipp.txt
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
echo ""
echo "Certificate for client $CLIENT revoked."
@ -1128,7 +1128,7 @@ function revokeClient () {
function removeUnbound () {
# Remove OpenVPN-related config
sed -i 's|include: \/etc\/unbound\/openvpn.conf||' /etc/unbound/unbound.conf
sed -i '/include: \/etc\/unbound\/openvpn.conf/d' /etc/unbound/unbound.conf
rm /etc/unbound/openvpn.conf
until [[ $REMOVE_UNBOUND =~ (y|n) ]]; do