SHARE
TWEET

Untitled

a guest May 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3.  
  4. # Image holen:              docker pull pihole/pihole:4.3_armhf
  5. # Container stoppen und löschen:   docker stop pihole && docker rm pihole
  6.  
  7.  
  8. # Falls Port 53 durch SystemD bereits belegt ist:
  9. # nano /etc/systemd/resolved.conf --> DNSStubListener=yes
  10.  
  11.  
  12.  
  13.  
  14.  
  15. ### EDIT START
  16.  
  17. VERSION="4.3_armhf"
  18. DIR="/mnt/storage/docker/pihole"
  19. LOCAL_IP="192.168.1.6"
  20.  
  21. ### EDIT END
  22.  
  23.  
  24. mkdir -p "$DIR/etc-pihole"
  25. mkdir -p "$DIR/etc-dnsmasq.d"
  26.  
  27. printf "Starte pi-hole Container ...\n"
  28.  
  29. docker run -d \
  30. --name pihole \
  31. -e ServerIP="$LOCAL_IP" \
  32. -e TZ="Europe/Berlin" \
  33. -e DNS1="1.1.1.1" \
  34. -e DNS2="1.0.0.1" \
  35. -p 53:53/tcp \
  36. -p 53:53/udp \
  37. -p 80:80/tcp \
  38. -p 443:443/tcp \
  39. -v "$DIR/etc-pihole/:/etc/pihole/" \
  40. -v "$DIR/etc-dnsmasq.d/:/etc/dnsmasq.d/" \
  41. --restart=unless-stopped \
  42. pihole/pihole:"$VERSION"
  43.  
  44.  
  45. printf "Hole das random Admin-Passwort (warte 10 Sekunden) ...\n"
  46. printf "Das Passwort beim initialen Start bitte gut merken oder danach ändern.\n"
  47. sleep 10 && docker logs pihole | grep random
  48.  
  49.  
  50.  
  51. printf "\n\n http://$LOCAL_IP/admin/index.php \n"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top