bootstrap.sh aktualisiert
This commit is contained in:
parent
1f94c5c9c8
commit
dc17562c0a
1 changed files with 2 additions and 6 deletions
|
@ -7,7 +7,8 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
USERNAME="skulladmin"
|
# Use the current user
|
||||||
|
USERNAME=$(whoami)
|
||||||
SSH_KEY_URL="https://skulldev.de/Skull-IT/trusted-ssh-keys/raw/branch/main/trusted-ssh-keys"
|
SSH_KEY_URL="https://skulldev.de/Skull-IT/trusted-ssh-keys/raw/branch/main/trusted-ssh-keys"
|
||||||
SSH_DIR="/home/$USERNAME/.ssh"
|
SSH_DIR="/home/$USERNAME/.ssh"
|
||||||
|
|
||||||
|
@ -16,11 +17,6 @@ echo "[+] Updating package list and installing essential packages..."
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y wget
|
apt-get install -y wget
|
||||||
|
|
||||||
# Create user if not exists
|
|
||||||
if ! id "$USERNAME" &>/dev/null; then
|
|
||||||
useradd -m -s /bin/bash "$USERNAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setting up SSH directory and authorized keys
|
# Setting up SSH directory and authorized keys
|
||||||
echo "[+] Setting up SSH directory..."
|
echo "[+] Setting up SSH directory..."
|
||||||
mkdir -p "$SSH_DIR"
|
mkdir -p "$SSH_DIR"
|
||||||
|
|
Loading…
Add table
Reference in a new issue