From 0d80ee95d6f48f9833a115db0a23e4f61d015c96 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 27 Nov 2021 22:31:48 -0500 Subject: [PATCH] Update podman_ha_setup.sh --- podman_ha_setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/podman_ha_setup.sh b/podman_ha_setup.sh index 15a424f4..79621eff 100644 --- a/podman_ha_setup.sh +++ b/podman_ha_setup.sh @@ -53,6 +53,21 @@ podman run -d \ --net=host \ homeassistant/home-assistant:stable &>/dev/null +echo "Creating service file podman@.service" +service_path="/etc/systemd/system/podman@.service" + +echo "[Unit] +Description=podman %I container + +[Service] +Restart=always +ExecStart=/usr/bin/podman start -a %i +ExecStop=/usr/bin/podman stop -t 2 %i + +[Install] +WantedBy=local.target" > $service_path +systemctl enable --now podman@container_homeassistant &>/dev/null + msg "Customizing container..." rm /etc/motd rm /etc/update-motd.d/10-uname