Compare commits

..

7 Commits

Author SHA1 Message Date
44b0b866b8 Update bootstrap.sh 2026-07-26 16:51:03 +02:00
35a7d7888f Update bootstrap.sh 2026-07-26 16:27:55 +02:00
2d5f13ba98 Update bootstrap.sh 2026-07-23 17:50:15 +02:00
1a35d6d60a Update bootstrap.sh 2026-07-23 17:41:06 +02:00
521f77cf5b Update bootstrap.sh 2026-07-01 22:33:25 +02:00
018ce95617 Update bootstrap.sh 2026-06-12 18:17:54 +02:00
ce9e345d37 Update bootstrap.sh 2026-06-12 18:11:39 +02:00

View File

@@ -18,6 +18,8 @@ TEMP_SCRIPT_CLEANER="/root/firstlogincleaner.sh"
#################. ALIASES
echo "alias ll='ls -l --color=auto'" >> ~/.bashrc
echo "alias l='ls -lAh --color=auto'" >> ~/.bashrc
echo "" >> ~/.bashrc
echo 'PS1="\u\[\e[0m\]@\[\e[31m\]\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\]# "' >> ~/.bashrc
source ~/.bashrc
@@ -112,15 +114,16 @@ cat << 'EOF' > $TEMP_SCRIPT_CLEANER
#!/bin/bash
# Attendre la fin du login
sleep 10
sleep 2
# Supprimer la ligne PAM
sed -i '/firstloginwrapper.sh/d' /etc/pam.d/sshd
# Supprimer les scripts
rm -f /root/firstlogin.sh
rm -f /root/firstlogin-wrapper.sh
rm -f /root/firstlogin-cleaner.sh
rm -f /root/firstloginwrapper.sh
rm -f /root/firstlogincleaner.sh
rm -f /root/bootstrap.sh
exit 0
EOF
@@ -135,6 +138,7 @@ mv $REBOOTBIN $REBOOTBINOLD
cat << 'EOF' > $REBOOTBIN
#!/bin/bash
touch /var/log/restart-flag
echo "[REBOOT] Rebooting server..."
sleep 1
/usr/sbin/reboot.old
EOF
@@ -144,6 +148,7 @@ chmod +x $REBOOTBIN
cat << 'EOF' > $SHUTBIN
#!/bin/bash
touch /var/log/restart-flag
echo "[SHUTDOWN] Stopping server..."
sleep 1
shutdown -h now
EOF