Update Installer.sh

This commit is contained in:
b.waal 2024-04-27 23:51:34 +02:00
parent d40f6e659f
commit 103b773fda

View File

@ -61,7 +61,7 @@ if [[ $dist == "Alpine" ]]; then
echo ""
fi
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
if (whiptail --title "Setup" --yesno "Use an APT-Cacher?" 8 78); then
CACHE=$(whiptail --inputbox "What is the IP address for APT-Cacher?" 8 78 192.168.1.102 --title "Setup" 3>&1 1>&2 2>&3)
echo 'Acquire::http::Proxy "http://XXX.XXX.XXX.XXX:80";'> /etc/apt/apt.conf.d/01prox
@ -113,7 +113,7 @@ apk update
apk upgrade
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
apt update
apt list --upgradeable 2>/dev/null | cut -d/ -f1 | grep -v Listing >> /tmp/install.list
fi
@ -127,7 +127,7 @@ if [[ $dist == "Alpine" ]]; then
IP=`hostname -i` && IP=$(echo $IP | cut -d' ' -f2,3)
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
hostnamectl set-hostname $HOSTNAME
timedatectl set-timezone Europe/Amsterdam
IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3)
@ -150,7 +150,7 @@ if [[ $IPv6 == "true" ]]; then
wget $GIT/$BRANCH/Config/Alpine/Alpine-local.conf -O /etc/sysctl.d/local.conf
sysctl -p
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
echo "" >> /etc/sysctl.conf
echo "#Disable IPv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
@ -175,7 +175,7 @@ git clone https://gitlab.com/yvelon/pi-hole /tmp/pi-hole
bash /tmp/pi-hole/automated\ install/basic-install.sh --unattended
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
echo "git iproute2 dialog ca-certificates cron curl iputils-ping psmisc sudo unzip idn2 libcap2-bin dns-root-data libcap2 netcat-openbsd procps jq" >> /tmp/install.list
if [[ $UNBOUND == "true" ]]; then
echo "unbound" >> /tmp/install.list
@ -213,7 +213,7 @@ if [[ $UNBOUND == "true" ]]; then
service unbound start && service pihole-FTL start
pihole restartdns
fi
if [[ $dist == "Debian" ]]; then
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
systemctl stop unbound && systemctl stop pihole-FTL
wget https://www.internic.net/domain/named.root -qO- | sudo tee /var/lib/unbound/root.hints
wget $GIT/$BRANCH/Config/Unbound/pi-hole.conf -O /etc/unbound/unbound.conf.d/pi-hole.conf