Update bootstrap.sh

This commit is contained in:
2026-06-12 17:53:01 +02:00
parent fa937ab8aa
commit 003dc11383

View File

@@ -11,8 +11,8 @@ CRONTABTMP="/tmp/crontab.root.tmp"
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
KEYFILE="/root/.ssh/$HOSTNAME" KEYFILE="/root/.ssh/$HOSTNAME"
TEMP_SCRIPT="/root/firstlogin.sh" TEMP_SCRIPT="/root/firstlogin.sh"
TEMP_SCRIPT_WRAPPER="root/firstloginwrapper.sh" TEMP_SCRIPT_WRAPPER="/root/firstloginwrapper.sh"
TEMP_SCRIPT_CLEANER="root/firstlogincleaner.sh" TEMP_SCRIPT_CLEANER="/root/firstlogincleaner.sh"
#################. ALIASES #################. ALIASES
@@ -206,3 +206,7 @@ ssh-keygen -t ed25519 -C "$HOSTNAME" -f "$KEYFILE" -N ""
# Ajouter la clé publique dans authorized_keys # Ajouter la clé publique dans authorized_keys
cat "${KEYFILE}.pub" >> /root/.ssh/authorized_keys cat "${KEYFILE}.pub" >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys
rm -fr /etc/systemd/system/bootstrap.service
rm -fr /etc/systemd/system/multi-user.target.wants/bootstrap.service
systemctl daemon-reload