diff --git a/bootstrap.sh b/bootstrap.sh index 97ffc29..c335f3f 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,7 +1,12 @@ #!/bin/bash - set -euo pipefail +# Check for root privileges +if [ "$(id -u)" -ne 0 ]; then + echo "[✗] Dieses Skript muss als root oder via sudo ausgeführt werden." >&2 + exit 1 +fi + USERNAME="skulladmin" SSH_KEY_URL="https://skulldev.de/kevinheyer/trusted-ssh-keys/raw/branch/main/trusted_ssh_keys" SSH_DIR="/home/$USERNAME/.ssh" @@ -41,4 +46,4 @@ echo "[+] Updating package list and installing essential packages..." apt-get update -y apt-get install -y sudo curl wget gnupg lsb-release software-properties-common -echo "[✓] Bootstrap complete." +echo "[✓] Bootstrap complete." \ No newline at end of file