fix: añadidos últimos cambios y se han hecho las comprobaciones pertinentes

This commit is contained in:
Javier Niño Sánchez
2026-10-26 23:00:01 +01:00
parent b2ca407e9c
commit cac83eae05
15 changed files with 317 additions and 7 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Sin comprobar el directorio: si no existe, tar deja un .tar.gz vacío
mkdir -p ~/backups
tar -czf ~/backups/$(basename $1)-$(date +%Y%m%d-%H%M).tar.gz $1

View File

@@ -0,0 +1 @@
15 * * * * bash $HOME/retos/2-backup/backup.sh $HOME/retos

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Sin borrar srv/bot.prev: el segundo mv mete bot dentro de bot.prev
base=$HOME/retos/3-deploy
mv $base/srv/bot $base/srv/bot.prev
cp -r $base/release $base/srv/bot
if ! $base/srv/bot/healthcheck; then
rm -rf $base/srv/bot
mv $base/srv/bot.prev $base/srv/bot
exit 1
fi

1
soluciones/fallos/equipo Normal file
View File

@@ -0,0 +1 @@
Los;Bugs Ñandú rojo con nombre larguísimo

View File

@@ -0,0 +1 @@
588 203.0.113.66

View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Sin cd: ./servicio solo funciona si se lanza desde 4-vigilante
while inotifywait -qq -e close_write config.conf; do
kill $(cat servicio.pid)
./servicio &
done