1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-05-31 18:50:47 +00:00

fix apt-get remove for debian uninstall

For Debian/Raspbian version, apt-get was installing instead of removing wireguard package.
Also removed iptables from line to prevent user global firewall from being removed
This commit is contained in:
Kévin Martin 2020-04-09 16:34:50 +02:00 committed by GitHub
parent 988b948207
commit ceec2ffb66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ echo "Remove WireGuard Server ($distribution)"
elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Raspbian" ]; then
systemctl stop wg-quick@wg0.service > /dev/null 2>&1
systemctl disable wg-quick@wg0.service > /dev/null 2>&1
apt-get install -y wireguard iptables --force-yes > /dev/null 2>&1
apt-get remove -y wireguard --force-yes > /dev/null 2>&1
rm -rf /etc/wireguard
rm -f /etc/sysctl.d/wg.conf
rm -f /etc/apt/sources.list.d/unstable.list