mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-06-06 05:20:49 +00:00
+ suse dist
This commit is contained in:
parent
5c2ba2a35b
commit
ef2e94c816
9
wireguard-install.sh
Normal file → Executable file
9
wireguard-install.sh
Normal file → Executable file
|
@ -53,8 +53,11 @@ function checkOS() {
|
||||||
OS=oracle
|
OS=oracle
|
||||||
elif [[ -e /etc/arch-release ]]; then
|
elif [[ -e /etc/arch-release ]]; then
|
||||||
OS=arch
|
OS=arch
|
||||||
|
elif cat /etc/os-release | grep ^ID | grep suse ; then
|
||||||
|
OS=suse
|
||||||
|
echo "Looks like you running this installer on a SuSe Linux system"
|
||||||
else
|
else
|
||||||
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, Oracle or Arch Linux system"
|
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, Oracle, Arch or SuSe Linux system"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -159,6 +162,8 @@ function installWireGuard() {
|
||||||
dnf install -y wireguard-tools qrencode iptables
|
dnf install -y wireguard-tools qrencode iptables
|
||||||
elif [[ ${OS} == 'arch' ]]; then
|
elif [[ ${OS} == 'arch' ]]; then
|
||||||
pacman -S --needed --noconfirm wireguard-tools qrencode
|
pacman -S --needed --noconfirm wireguard-tools qrencode
|
||||||
|
elif [[ ${OS} == 'suse' ]]; then
|
||||||
|
zypper -q install -y wireguard-tools qrencode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure the directory exists (this does not seem the be the case on fedora)
|
# Make sure the directory exists (this does not seem the be the case on fedora)
|
||||||
|
@ -388,6 +393,8 @@ function uninstallWg() {
|
||||||
yum -y autoremove
|
yum -y autoremove
|
||||||
elif [[ ${OS} == 'arch' ]]; then
|
elif [[ ${OS} == 'arch' ]]; then
|
||||||
pacman -Rs --noconfirm wireguard-tools qrencode
|
pacman -Rs --noconfirm wireguard-tools qrencode
|
||||||
|
elif [[ ${OS} == 'suse' ]]; then
|
||||||
|
zypper -q rm -y wireguard-tools qrencode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /etc/wireguard
|
rm -rf /etc/wireguard
|
||||||
|
|
Loading…
Reference in New Issue
Block a user