blob: 708397d1c7c2f02ff295eb0da6ec1a023c178ed2 (
plain) (
tree)
|
|
#!/bin/sh
set -ex
export DEBIAN_FRONTEND=noninteractive
# motd
chmod 644 /etc/update-motd.d/*
systemctl mask motd-news.service
systemctl mask motd-news.timer
# Add update- and security-repositories, and perform upgrade
RELEASE=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F'=' '{print $2}')
echo "deb http://no.archive.ubuntu.com ${RELEASE}-security main universe" >> /etc/apt/sources.list
echo "deb http://no.archive.ubuntu.com ${RELEASE}-updates main universe" >> /etc/apt/sources.list
apt-get update && apt-get --yes full-upgrade && apt-get --yes autoremove
# network
systemctl enable systemd-networkd
export VERSION='v4.3.2'
echo "$VERSION" > /etc/docker-pi-hole-version
cd /root
wget "https://raw.githubusercontent.com/pi-hole/docker-pi-hole/master/install.sh"
export PIHOLE_INSTALL="ph_install.sh"
export S6OVERLAY_RELEASE="https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-amd64.tar.gz"
bash -ex ./install.sh 2>&1
sed -i 's/^PIHOLE_INTERFACE.*/PIHOLE_INTERFACE\=host0/' /etc/pihole/setupVars.conf
sed -i '/^PIHOLE_DNS/d' /etc/pihole/setupVars.conf
echo "PIHOLE_DNS_1=130.67.15.198" >> /etc/pihole/setupVars.conf
echo "PIHOLE_DNS_2=193.213.112.4" >> /etc/pihole/setupVars.conf
sed -i 's/^interface.*/interface\=host0/' /etc/dnsmasq.d/01-pihole.conf
sed -i 's/server\=8\.8\.8\.8/server\=130\.67\.15\.198/' /etc/dnsmasq.d/01-pihole.conf
sed -i 's/server\=8\.8\.4\.4/server\=193\.213\.112\.4/' /etc/dnsmasq.d/01-pihole.conf
sed -i '/.*ipv6.*/d' /etc/lighttpd/lighttpd.conf
echo 'server.bind = "10.71.2.2"' > /etc/lighttpd/external.conf
|