From f8ba1bd645d392579c149142548ec2a4748f4fb9 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 22 Aug 2023 02:57:57 -0400 Subject: [PATCH] Update the linger file for the new user name. --- .includes/chuser.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.includes/chuser.sh b/.includes/chuser.sh index 83496da..ff5e185 100755 --- a/.includes/chuser.sh +++ b/.includes/chuser.sh @@ -56,6 +56,10 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin EOF # Heredocument end. - # Files in cron.d must be 644 to work. - sudo "${sudoFlags[@]}" chmod 644 /etc/cron.d/0chuser +# Make sure sound services start for the new user. +mkdir -p /var/lib/systemd/linger +sudo mv -v "/var/lib/systemd/linger/$oldUser" "/var/lib/systemd/linger/$newUser" + +# Files in cron.d must be 644 to work. +sudo "${sudoFlags[@]}" chmod 644 /etc/cron.d/0chuser