mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
more uninstall
This commit is contained in:
parent
b230bade61
commit
ff77077d56
1 changed files with 15 additions and 15 deletions
|
@ -105,8 +105,22 @@ removeAll(){
|
|||
|
||||
fi
|
||||
|
||||
vpnStillExists='no'
|
||||
|
||||
if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile}" ]; then
|
||||
vpnStillExists='yes'
|
||||
$SUDO rm -f /usr/local/bin/pivpn
|
||||
$SUDO ln -s -T ${pivpnScriptDir}/${othervpn}/pivpn.sh /usr/local/bin/pivpn
|
||||
echo ":::"
|
||||
echo "::: Two VPN protocols exist, you should remove the other one too"
|
||||
echo ":::"
|
||||
|
||||
else
|
||||
rm -f /etc/bash_completion.d/pivpn
|
||||
fi
|
||||
|
||||
# Disable IPv4 forwarding
|
||||
if [ ${vpnStillExists} != 'yes' ]; then
|
||||
if [ ${vpnStillExists} == 'no' ]; then
|
||||
sed -i '/net.ipv4.ip_forward=1/c\#net.ipv4.ip_forward=1' /etc/sysctl.conf
|
||||
sysctl -p
|
||||
fi
|
||||
|
@ -183,20 +197,6 @@ removeAll(){
|
|||
rmdir /etc/pivpn
|
||||
rm -f /var/log/*pivpn*
|
||||
|
||||
vpnStillExists='no'
|
||||
|
||||
if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile}" ]; then
|
||||
$SUDO rm -f /usr/local/bin/pivpn
|
||||
$SUDO ln -s -T ${pivpnScriptDir}/${othervpn}/pivpn.sh /usr/local/bin/pivpn
|
||||
vpnStillExists='yes'
|
||||
echo ":::"
|
||||
echo "::: Two VPN protocols exist, you should remove the other one too"
|
||||
echo ":::"
|
||||
|
||||
else
|
||||
rm -f /etc/bash_completion.d/pivpn
|
||||
fi
|
||||
|
||||
echo ":::"
|
||||
echo "::: Removing VPN configuration files..."
|
||||
|
||||
|
|
Loading…
Reference in a new issue