From e40657de17dbd82f887b6fe1e027ea50219d0a72 Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Mon, 27 Jun 2022 10:05:28 +0200 Subject: [PATCH] [Ubuntu] Enable systemd lingering (#5812) --- images/linux/post-generation/systemd-linger.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 images/linux/post-generation/systemd-linger.sh diff --git a/images/linux/post-generation/systemd-linger.sh b/images/linux/post-generation/systemd-linger.sh new file mode 100644 index 000000000..294c8f1ba --- /dev/null +++ b/images/linux/post-generation/systemd-linger.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Enable user session on boot, not on login +UserId=$(cut -d: -f3 /etc/passwd | tail -1) +loginctl enable-linger $UserId