1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-23 21:46:08 +03:00

Uninstalling OpenVPN remove ovpns

This commit is contained in:
cezar97 2018-07-04 02:24:41 +03:00 committed by GitHub
parent c07a6db715
commit 3e349e96d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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