aboutsummaryrefslogtreecommitdiff
path: root/roles/pihole/files/pihole.service
diff options
context:
space:
mode:
Diffstat (limited to 'roles/pihole/files/pihole.service')
-rw-r--r--roles/pihole/files/pihole.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/pihole/files/pihole.service b/roles/pihole/files/pihole.service
new file mode 100644
index 0000000..6d992d0
--- /dev/null
+++ b/roles/pihole/files/pihole.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Manage PiHole
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+User=root
+ExecStart=/usr/local/bin/podman-compose -f /opt/containers/pihole.yaml up -d
+ExecStop=/usr/local/bin/podman-compose -f /opt/containers/pihole.yaml down
+
+[Install]
+WantedBy=multi-user.target