aboutsummaryrefslogtreecommitdiffstats
path: root/mkosi.postinst
diff options
context:
space:
mode:
authordennis <dennis@mrslave>2019-10-23 20:52:46 +0200
committerdennis <dennis@mrslave>2019-10-23 20:52:46 +0200
commit1ed250752c69271c79c770c1874c4c54fb5230be (patch)
tree3c880a0ef5b3564e072fbb7be12b32fc3ceef1e9 /mkosi.postinst
downloadmkosi-pihole-1ed250752c69271c79c770c1874c4c54fb5230be.tar.gz
initial commit
Diffstat (limited to 'mkosi.postinst')
-rwxr-xr-xmkosi.postinst33
1 files changed, 33 insertions, 0 deletions
diff --git a/mkosi.postinst b/mkosi.postinst
new file mode 100755
index 0000000..73da326
--- /dev/null
+++ b/mkosi.postinst
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -ex
+export DEBIAN_FRONTEND=noninteractive
+
+# 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
+