diff options
author | Anatolii Cherednichenko <greatestcombinator@gmail.com> | 2021-11-13 02:31:39 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 17:31:39 +0100 |
commit | 616e123e6f122004d52e3fd59ca03c32e5482972 (patch) | |
tree | 53caa3f9296b42a581fced89072a76df652b87dd | |
parent | e05e633014628a65942cffab66f68228b6e17f7a (diff) |
Added support for Oracle Linux 8 (#269)
https://www.wireguard.com/install/#oracle-linux-8-uek6-tools
-rw-r--r-- | wireguard-install.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh index 71d8616..1109db3 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -48,10 +48,13 @@ function checkOS() { elif [[ -e /etc/centos-release ]]; then source /etc/os-release OS=centos + elif [[ -e /etc/oracle-release ]]; then + source /etc/os-release + OS=oracle elif [[ -e /etc/arch-release ]]; then OS=arch else - echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS or Arch Linux system" + echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, Oracle or Arch Linux system" exit 1 fi } @@ -148,6 +151,12 @@ function installWireGuard() { yum -y install yum-plugin-elrepo fi yum -y install kmod-wireguard wireguard-tools iptables qrencode + elif [[ ${OS} == 'oracle' ]]; then + dnf install -y oraclelinux-developer-release-el8 + dnf config-manager --disable -y ol8_developer + dnf config-manager --enable -y ol8_developer_UEKR6 + dnf config-manager --save -y --setopt=ol8_developer_UEKR6.includepkgs='wireguard-tools*' + dnf install -y wireguard-tools qrencode iptables elif [[ ${OS} == 'arch' ]]; then pacman -S --needed --noconfirm wireguard-tools qrencode fi @@ -374,6 +383,9 @@ function uninstallWg() { elif [[ ${OS} == 'centos' ]]; then yum -y remove kmod-wireguard wireguard-tools qrencode yum -y autoremove + elif [[ ${OS} == 'oracle' ]]; then + yum -y remove wireguard-tools qrencode + yum -y autoremove elif [[ ${OS} == 'arch' ]]; then pacman -Rs --noconfirm wireguard-tools qrencode fi |