From e3ab1aa2b45f6a5e29aabc55f98c6a2c1ba687df Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 20 Nov 2024 09:31:25 -0800 Subject: [PATCH] powerdns-admin: clean up old pods using same name on start if needed --- roles/pdns/templates/powerdns-admin.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/pdns/templates/powerdns-admin.service b/roles/pdns/templates/powerdns-admin.service index e8d4234..809dab4 100644 --- a/roles/pdns/templates/powerdns-admin.service +++ b/roles/pdns/templates/powerdns-admin.service @@ -5,6 +5,8 @@ Wants=network.target [Service] Type=simple ExecStartPre=/usr/bin/podman pull docker.io/powerdnsadmin/pda-legacy:latest +ExecStartPre=-/usr/bin/podman stop powerdns-admin +ExecStartPre=-/usr/bin/podman rm powerdns-admin ExecStart=/usr/bin/podman run --rm -v pda-data:/data -p 9191:80 --env-file /etc/powerdns-admin.env --name powerdns-admin docker.io/powerdnsadmin/pda-legacy:latest Restart=always