Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Image holen: docker pull pihole/pihole:4.3_armhf
- # Container stoppen und löschen: docker stop pihole && docker rm pihole
- # Falls Port 53 durch SystemD bereits belegt ist:
- # nano /etc/systemd/resolved.conf --> DNSStubListener=yes
- # systemctl daemon-reload && systemd-resolved.service
- ### START EDIT
- VERSION="4.3_armhf"
- DIR="/mnt/storage/docker/pihole"
- LOCAL_IP="192.168.1.6"
- ### END EDIT
- mkdir -p "$DIR/etc-pihole"
- mkdir -p "$DIR/etc-dnsmasq.d"
- printf "Starte pi-hole Container ...\n"
- docker run -d \
- --name pihole \
- -e ServerIP="$LOCAL_IP" \
- -e TZ="Europe/Berlin" \
- -e DNS1="1.1.1.1" \
- -e DNS2="1.0.0.1" \
- -p 53:53/tcp \
- -p 53:53/udp \
- -p 80:80/tcp \
- -p 443:443/tcp \
- -v "$DIR/etc-pihole/:/etc/pihole/" \
- -v "$DIR/etc-dnsmasq.d/:/etc/dnsmasq.d/" \
- --restart=unless-stopped \
- pihole/pihole:"$VERSION"
- printf "Hole das random Admin-Passwort (warte 15 Sekunden bis alles hochgefahren ist) ...\n"
- printf "Das Passwort beim initialen Start bitte gut merken oder danach ändern.\n"
- sleep 10 && docker logs pihole | grep random
- printf "\n\n http://$LOCAL_IP/admin/index.php \n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement