mirror of
https://github.com/marcogll/scripts_mg.git
synced 2026-01-13 13:25:15 +00:00
Update auto_server_setup.sh
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
cat > auto_server_setup.sh <<'SCRIPT'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# auto_server_setup.sh — Marco G. & ChatGPT — 2025-04-28
|
# auto_server_setup.sh — Marco G. & ChatGPT — 2025-04-28
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -143,22 +144,24 @@ main() {
|
|||||||
install_pihole
|
install_pihole
|
||||||
install_plex
|
install_plex
|
||||||
|
|
||||||
LOG "Instalación completa."
|
LOG \"Instalación completa.\"
|
||||||
LOG "Accesos:\n • Portainer → https://<IP>:9443\n • CasaOS → http://<IP>\n • Plex → http://<IP>:32400/web\n • Pi-hole → http://<IP>/admin"
|
LOG \"Accesos:\\n • Portainer → https://<IP>:9443\\n • CasaOS → http://<IP>\\n • Plex → http://<IP>:32400/web\\n • Pi-hole → http://<IP>/admin\"
|
||||||
|
|
||||||
if [[ "$AUTO_REBOOT" == "yes" ]]; then
|
if [[ \"$AUTO_REBOOT\" == \"yes\" ]]; then
|
||||||
LOG "Reiniciando en 10 s… (Ctrl-C para abortar)"
|
LOG \"Reiniciando en 10 s… (Ctrl-C para abortar)\"
|
||||||
sleep 10 && reboot
|
sleep 10 && reboot
|
||||||
else
|
else
|
||||||
printf "\n¿Deseas reiniciar ahora? [y/N]: "
|
printf \"\\n¿Deseas reiniciar ahora? [y/N]: \"
|
||||||
read -r REPLY
|
read -r REPLY
|
||||||
if [[ ${REPLY,,} == "y" ]]; then
|
if [[ ${REPLY,,} == \"y\" ]]; then
|
||||||
LOG "Reiniciando…"
|
LOG \"Reiniciando…\"
|
||||||
reboot
|
reboot
|
||||||
else
|
else
|
||||||
LOG "No se reinició. Hazlo manualmente cuando quieras."
|
LOG \"No se reinició. Hazlo manualmente cuando quieras.\"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main \"$@\"
|
main \"$@\"
|
||||||
|
SCRIPT
|
||||||
|
chmod +x auto_server_setup.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user