From 65448fd8f4deee2ec5c8cd1dccfb46a4ba94e1b8 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Mon, 3 Mar 2025 23:55:41 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Liest=20Nutzer=20aus,=20wenn=20das=20Skr?= =?UTF-8?q?ipt=20als=20root=20ausgef=C3=BChrt=20wird.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Maintenance/Update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maintenance/Update.sh b/Maintenance/Update.sh index 1bd53fb..3c5200c 100755 --- a/Maintenance/Update.sh +++ b/Maintenance/Update.sh @@ -12,7 +12,8 @@ if [[ $EUID -ne 0 ]]; then fi # === Variablen === -USER="$SUDO_USER" +WHOAMI=$(whoami) +USER=${SUDO_USER:-$WHOAMI} # === Skript-Funktionen === cleanup() {