aboutsummaryrefslogtreecommitdiff
path: root/wireguard-install.sh
diff options
context:
space:
mode:
authorangristan <angristan@pm.me>2020-02-15 16:21:45 +0100
committerangristan <angristan@pm.me>2020-02-15 16:21:45 +0100
commitb9da4d03cdac26430737ed1cbaed37bfb66e8c9f (patch)
treecac5ee34c8530b19b4b885b1c87ef2cf01666c5c /wireguard-install.sh
parent3b2fb57231cb9bf677af966fd0771541e6acd44c (diff)
Install packages non-interactively
Diffstat (limited to 'wireguard-install.sh')
-rw-r--r--wireguard-install.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index f11e74e..08ffd93 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -81,27 +81,28 @@ fi
# Install WireGuard tools and module
if [[ "$OS" = 'ubuntu' ]]; then
- apt-get install software-properties-common
- add-apt-repository ppa:wireguard/wireguard
+ apt-get install -y software-properties-common
+ add-apt-repository -y ppa:wireguard/wireguard
apt-get update
- apt-get install "linux-headers-$(uname -r)"
- apt-get install wireguard iptables resolvconf qrencode
+ apt-get install -y "linux-headers-$(uname -r)"
+ apt-get install -y wireguard iptables resolvconf qrencode
elif [[ "$OS" = 'debian' ]]; then
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
- apt-get install "linux-headers-$(uname -r)"
- apt install wireguard iptables resolvconf qrencode
+ apt-get install -y "linux-headers-$(uname -r)"
+ apt-get install -y wireguard iptables resolvconf qrencode
elif [[ "$OS" = 'fedora' ]]; then
- dnf copr enable jdoss/wireguard
- dnf install wireguard-dkms wireguard-tools iptables qrencode
+ dnf install -y dnf-plugins-core
+ dnf copr enable -y jdoss/wireguard
+ dnf install -y wireguard-dkms wireguard-tools iptables qrencode
elif [[ "$OS" = 'centos' ]]; then
curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
- yum install epel-release
- yum install wireguard-dkms wireguard-tools iptables qrencode
+ yum -y install epel-release
+ yum -y install wireguard-dkms wireguard-tools iptables qrencode
elif [[ "$OS" = 'arch' ]]; then
- pacman -S linux-headers
- pacman -S wireguard-tools iptables wireguard-arch qrencode
+ pacman -S --noconfirm linux-headers
+ pacman -S --noconfirm wireguard-tools iptables wireguard-arch qrencode
fi
# Make sure the directory exists (this does not seem the be the case on fedora)