summaryrefslogtreecommitdiffstats
path: root/modules/pihole/templates/pihole.service
blob: 67ac7ed82c63eed70df208278fcb665f9d9397be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=runs pihole
After=network.target
RequiresMountsFor=/media/persistent
WantedBy=media-persistent.mount

[Service]
ExecStart=/usr/bin/podman run --rm --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80 -e TZ=America/New_York -v "<%= @dir %>/etc-pihole/:/etc/pihole/" -v "<%= @dir %>/etc-dnsmasq.d/:/etc/dnsmasq.d/" -v "/var/log/pihole.log:/var/log/pihole.log" --dns 127.0.0.1 --dns 4.2.2.4 --hostname pi.hole -e VIRTUAL_HOST=pi.hole -e PROXY_LOCATION=pi.hole -e WEBPASSWORD=<%= @webpassword %> -e ServerIP=127.0.0.1 docker.io/pihole/pihole:latest
ExecStop=/usr/bin/podman stop pihole
Restart=always

[Install]
WantedBy=default.target