summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-03-26 11:47:14 -0400
committerJesse Luehrs <doy@tozt.net>2023-03-26 11:47:14 -0400
commitac3833b0a9eb37c62f9fba22d7b94156e14128f4 (patch)
treee04fb0d0013e78dc15787a1b956f620592e6ca71
parent4482ae9e0b359eca042e4c2818d740ccb24ebd50 (diff)
downloadpuppet-tozt-ac3833b0a9eb37c62f9fba22d7b94156e14128f4.tar.gz
puppet-tozt-ac3833b0a9eb37c62f9fba22d7b94156e14128f4.zip
forcibly remove the pihole container after stop
i'm not sure why this is necessary, since i'm running the container with --rm, but sometimes it seems to leave it behind/:
-rw-r--r--modules/pihole/templates/pihole.service1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/pihole/templates/pihole.service b/modules/pihole/templates/pihole.service
index 33029c2..6e6f22c 100644
--- a/modules/pihole/templates/pihole.service
+++ b/modules/pihole/templates/pihole.service
@@ -6,6 +6,7 @@ RequiresMountsFor=/media/persistent
[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
+ExecStopPost=/usr/bin/podman rm pihole
Restart=always
[Install]