bootstrap.sh aktualisiert

add sudo requirements
This commit is contained in:
kevinheyer 2025-04-09 15:11:49 +00:00
parent aae23e6fa3
commit ad8fa2abc8

View file

@ -1,7 +1,12 @@
#!/bin/bash #!/bin/bash
set -euo pipefail 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" USERNAME="skulladmin"
SSH_KEY_URL="https://skulldev.de/kevinheyer/trusted-ssh-keys/raw/branch/main/trusted_ssh_keys" SSH_KEY_URL="https://skulldev.de/kevinheyer/trusted-ssh-keys/raw/branch/main/trusted_ssh_keys"
SSH_DIR="/home/$USERNAME/.ssh" SSH_DIR="/home/$USERNAME/.ssh"
@ -41,4 +46,4 @@ echo "[+] Updating package list and installing essential packages..."
apt-get update -y apt-get update -y
apt-get install -y sudo curl wget gnupg lsb-release software-properties-common apt-get install -y sudo curl wget gnupg lsb-release software-properties-common
echo "[✓] Bootstrap complete." echo "[✓] Bootstrap complete."