mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-22 08:49:03 +01:00
Improve sed line deletion (#608)
This commit is contained in:
parent
ef5d5faf30
commit
2c9c0ed0c3
@ -1120,7 +1120,7 @@ function revokeClient () {
|
|||||||
chmod 644 /etc/openvpn/crl.pem
|
chmod 644 /etc/openvpn/crl.pem
|
||||||
find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete
|
find /home/ -maxdepth 2 -name "$CLIENT.ovpn" -delete
|
||||||
rm -f "/root/$CLIENT.ovpn"
|
rm -f "/root/$CLIENT.ovpn"
|
||||||
sed -i "s|^$CLIENT,.*||" /etc/openvpn/ipp.txt
|
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Certificate for client $CLIENT revoked."
|
echo "Certificate for client $CLIENT revoked."
|
||||||
@ -1128,7 +1128,7 @@ function revokeClient () {
|
|||||||
|
|
||||||
function removeUnbound () {
|
function removeUnbound () {
|
||||||
# Remove OpenVPN-related config
|
# 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
|
rm /etc/unbound/openvpn.conf
|
||||||
|
|
||||||
until [[ $REMOVE_UNBOUND =~ (y|n) ]]; do
|
until [[ $REMOVE_UNBOUND =~ (y|n) ]]; do
|
||||||
|
Loading…
Reference in New Issue
Block a user