Update Installer.sh
This commit is contained in:
parent
d40f6e659f
commit
103b773fda
12
Installer.sh
12
Installer.sh
@ -61,7 +61,7 @@ if [[ $dist == "Alpine" ]]; then
|
|||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $dist == "Debian" ]]; then
|
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
|
||||||
if (whiptail --title "Setup" --yesno "Use an APT-Cacher?" 8 78); 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)
|
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
|
echo 'Acquire::http::Proxy "http://XXX.XXX.XXX.XXX:80";'> /etc/apt/apt.conf.d/01prox
|
||||||
@ -113,7 +113,7 @@ apk update
|
|||||||
apk upgrade
|
apk upgrade
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $dist == "Debian" ]]; then
|
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
|
||||||
apt update
|
apt update
|
||||||
apt list --upgradeable 2>/dev/null | cut -d/ -f1 | grep -v Listing >> /tmp/install.list
|
apt list --upgradeable 2>/dev/null | cut -d/ -f1 | grep -v Listing >> /tmp/install.list
|
||||||
fi
|
fi
|
||||||
@ -127,7 +127,7 @@ if [[ $dist == "Alpine" ]]; then
|
|||||||
IP=`hostname -i` && IP=$(echo $IP | cut -d' ' -f2,3)
|
IP=`hostname -i` && IP=$(echo $IP | cut -d' ' -f2,3)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $dist == "Debian" ]]; then
|
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
|
||||||
hostnamectl set-hostname $HOSTNAME
|
hostnamectl set-hostname $HOSTNAME
|
||||||
timedatectl set-timezone Europe/Amsterdam
|
timedatectl set-timezone Europe/Amsterdam
|
||||||
IP=`hostname -I` && IP=$(echo $IP | cut -d' ' -f2,3)
|
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
|
wget $GIT/$BRANCH/Config/Alpine/Alpine-local.conf -O /etc/sysctl.d/local.conf
|
||||||
sysctl -p
|
sysctl -p
|
||||||
fi
|
fi
|
||||||
if [[ $dist == "Debian" ]]; then
|
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
|
||||||
echo "" >> /etc/sysctl.conf
|
echo "" >> /etc/sysctl.conf
|
||||||
echo "#Disable IPv6" >> /etc/sysctl.conf
|
echo "#Disable IPv6" >> /etc/sysctl.conf
|
||||||
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /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
|
bash /tmp/pi-hole/automated\ install/basic-install.sh --unattended
|
||||||
fi
|
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
|
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
|
if [[ $UNBOUND == "true" ]]; then
|
||||||
echo "unbound" >> /tmp/install.list
|
echo "unbound" >> /tmp/install.list
|
||||||
@ -213,7 +213,7 @@ if [[ $UNBOUND == "true" ]]; then
|
|||||||
service unbound start && service pihole-FTL start
|
service unbound start && service pihole-FTL start
|
||||||
pihole restartdns
|
pihole restartdns
|
||||||
fi
|
fi
|
||||||
if [[ $dist == "Debian" ]]; then
|
if [[ $dist == "Debian" ]] || [[ $dist == "Raspbian" ]]; then
|
||||||
systemctl stop unbound && systemctl stop pihole-FTL
|
systemctl stop unbound && systemctl stop pihole-FTL
|
||||||
wget https://www.internic.net/domain/named.root -qO- | sudo tee /var/lib/unbound/root.hints
|
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
|
wget $GIT/$BRANCH/Config/Unbound/pi-hole.conf -O /etc/unbound/unbound.conf.d/pi-hole.conf
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user