Pi-hole Port Update Helper

I’m a big fan of Pi-hole. Due to my instance running on the same Raspberry Pi as Home Assistant I have it configured for a different port than the default 80. Each time I run an update for Pi-hole I manually edit the config file and restart the service, because the update scripts reset the port. I finally whipped up a script to take care of it.

sudo cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.old
sudo sed -i -e 's/= 80/= 8081/g' /etc/lighttpd/lighttpd.conf
sudo systemctl restart lighttpd

%d bloggers like this: