From db3983e4a1afda2fe14ad1e2f0dacb1fbee6a10f Mon Sep 17 00:00:00 2001 From: Mateus Melchiades Date: Thu, 23 May 2024 10:58:39 -0300 Subject: [PATCH] feat: systemd unit for apx-vso-pico Adds a systemd unit for managing apx-vso-pico, which automatically starts the container on startup and shuts it down on poweroff. When enabled by the user (new installations should do by default with first-setup), this service avoids having to wait for the container to start when opening a terminal for the first time, as well as drastically reduces the poweroff time. --- .../etc/systemd/user/apx-vso-pico.service | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 includes.container/etc/systemd/user/apx-vso-pico.service diff --git a/includes.container/etc/systemd/user/apx-vso-pico.service b/includes.container/etc/systemd/user/apx-vso-pico.service new file mode 100644 index 0000000..2a3a17b --- /dev/null +++ b/includes.container/etc/systemd/user/apx-vso-pico.service @@ -0,0 +1,18 @@ +[Unit] +Description=VSO Pico Container +Wants=network-online.target +After=network-online.target + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=10 +ExecStart=/.system/usr/bin/podman start apx-vso-pico +ExecStop=/.system/usr/bin/podman stop \ + -t 5 apx-vso-pico +ExecStopPost=/.system/usr/bin/podman stop \ + -t 5 apx-vso-pico +Type=forking + +[Install] +WantedBy=default.target