mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-27 15:36:07 +03:00
Uninstalling OpenVPN remove ovpns
This commit is contained in:
parent
c07a6db715
commit
3e349e96d9
@ -155,6 +155,12 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
||||
else
|
||||
yum remove openvpn -y
|
||||
fi
|
||||
OVPNS=$(ls /etc/openvpn/easy-rsa/pki/issued | awk -F "." {'print $1'})
|
||||
for i in $OVPNS
|
||||
do
|
||||
rm $(find /home -maxdepth 2 | grep $i.ovpn) 2>/dev/null
|
||||
rm /root/$i.ovpn 2>/dev/null
|
||||
done
|
||||
rm -rf /etc/openvpn
|
||||
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user