Skip to content
Snippets Groups Projects
Commit beafab9d authored by Martin Mareš's avatar Martin Mareš
Browse files

Install systemd service template

parent 73bd3fc3
No related branches found
No related tags found
No related merge requests found
......@@ -3,5 +3,4 @@
Albireo cleanup:
- prerouting rule
- shc@.service
- containers
#!/bin/sh
set -e
# systemd reload is usually added automatically by dh_installsystemd, but our
# package provides only a template unit, which is not detected by DH. Let us do
# it manually.
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
fi
fi
[Unit]
Description=Container %i (via shipcat)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/containers/storage
[Service]
Type=forking
TimeoutStopSec=60
PIDFile=%t/shc/%i.pid
ExecStartPre=/bin/rm -f %t/shc/%i.pid
ExecStart=/usr/bin/podman start %i
ExecStop=/usr/bin/podman stop --ignore %i
RuntimeDirectory=shc
RuntimeDirectoryPreserve=yes
[Install]
WantedBy=default.target
......@@ -16,3 +16,6 @@ execute_after_dh_auto_install:
override_dh_fixperms:
dh_fixperms --exclude usr/bin/shc
override_dh_installsystemd:
dh_installsystemd --name shc@ shc@.service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment