From f4c684b51d47b4a09aef539150405ebbf0a149c9 Mon Sep 17 00:00:00 2001 From: admManuel Date: Wed, 7 May 2025 07:59:21 +0000 Subject: [PATCH] Update Ansible/ssh-keyscan.sh --- Ansible/ssh-keyscan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ansible/ssh-keyscan.sh b/Ansible/ssh-keyscan.sh index 6155964..bd0c79d 100644 --- a/Ansible/ssh-keyscan.sh +++ b/Ansible/ssh-keyscan.sh @@ -7,7 +7,7 @@ set -euo pipefail # ---------- Root-Check (sofort & sicher) -------------- script_path=$(readlink -f "$0") # absoluter Pfad des Skripts -if [[ $EUID -ne 0 ]]; then +if [ "$(id -u)" -ne 0 ]; then sudo -v # 1× Passwort, Timestamp bleibt gültig exec sudo -- "$script_path" "$@" # ersetzt Prozess, KEIN zweiter Prompt fi