home-pods/container-pihole.service

41 lines
1.1 KiB
SYSTEMD
Raw Permalink Normal View History

2022-02-14 18:11:23 +01:00
[Unit]
Description=Podman container-pihole.service
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/mkdir -p /home/pi/containers/pihole
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon --replace -d \
--name=pihole \
--hostname=pi-hole \
--cap-add=NET_ADMIN \
--dns=127.0.0.1 \
--dns=1.1.1.1 \
-e TZ=Europe/Brussels \
-e SERVERIP=192.168.1.222 \
-e DNS1=1.1.1.1 \
-e DNS2=1.0.0.1 \
-e DNSMASQ_LISTENING=all \
-e WEBPASSWORD=cw+89hF>F&R)p0BFQ?W5 \
-e TEMPERATUREUNIT=c \
-v /home/pi/containers/pihole/etc-pihole:/etc/pihole:Z \
-v /home/pi/containers/pihole/etc-dnsmasq.d:/etc/dnsmasq.d:Z \
-p 8321:80/tcp \
-p 67:67/udp \
-p 53:53/tcp \
-p 53:53/udp \
--label "io.containers.autoupdate=registry" \
2022-08-21 10:59:37 +02:00
docker.io/pihole/pihole:latest
2022-02-14 18:11:23 +01:00
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
2022-08-21 10:59:37 +02:00
WantedBy=default.target