1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-11-21 20:25:14 +00:00

Don't auto remove dependencies when uninstalling

Fix https://github.com/angristan/wireguard-install/issues/301
This commit is contained in:
Stanislas Lange 2023-01-22 15:44:31 +01:00
parent c97e3cc6b3
commit d36a6459a3
No known key found for this signature in database

View File

@ -431,28 +431,22 @@ function uninstallWg() {
systemctl disable "wg-quick@${SERVER_WG_NIC}" systemctl disable "wg-quick@${SERVER_WG_NIC}"
if [[ ${OS} == 'ubuntu' ]]; then if [[ ${OS} == 'ubuntu' ]]; then
apt-get autoremove --purge -y wireguard qrencode apt-get remove -y wireguard wireguard-tools qrencode
elif [[ ${OS} == 'debian' ]]; then elif [[ ${OS} == 'debian' ]]; then
apt-get autoremove --purge -y wireguard qrencode apt-get remove -y wireguard wireguard-tools qrencode
elif [[ ${OS} == 'fedora' ]]; then elif [[ ${OS} == 'fedora' ]]; then
dnf remove -y wireguard-tools qrencode dnf remove -y --noautoremove wireguard-tools qrencode
if [[ ${VERSION_ID} -lt 32 ]]; then if [[ ${VERSION_ID} -lt 32 ]]; then
dnf remove -y wireguard-dkms dnf remove -y --noautoremove wireguard-dkms
dnf copr disable -y jdoss/wireguard dnf copr disable -y jdoss/wireguard
fi fi
dnf autoremove -y elif [[ ${OS} == 'centos' ]] || [[ ${OS} == 'almalinux' ]] || [[ ${OS} == 'rocky' ]]; then
elif [[ ${OS} == 'almalinux' ]]; then yum remove -y --noautoremove wireguard-tools
dnf -y remove wireguard-tools qrencode
if [[ ${VERSION_ID} == 8* ]]; then if [[ ${VERSION_ID} == 8* ]]; then
dnf -y remove kmod-wireguard yum remove --noautoremove kmod-wireguard qrencode
fi fi
dnf -y autoremove
elif [[ ${OS} == 'centos' ]]; then
yum -y remove kmod-wireguard wireguard-tools qrencode
yum -y autoremove
elif [[ ${OS} == 'oracle' ]]; then elif [[ ${OS} == 'oracle' ]]; then
yum -y remove wireguard-tools qrencode yum remove --noautoremove wireguard-tools qrencode
yum -y autoremove
elif [[ ${OS} == 'arch' ]]; then elif [[ ${OS} == 'arch' ]]; then
pacman -Rs --noconfirm wireguard-tools qrencode pacman -Rs --noconfirm wireguard-tools qrencode
fi fi