fix minor issues

This commit is contained in:
Fco. Javier Delgado del Hoyo 2023-01-19 20:14:48 +01:00
parent 1f5f594e14
commit d6217926f2
3 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ test:
# Checking for syntax errors
set -e; for SCRIPT in *.sh; \
do \
sh -n $$SCRIPT; \
bash -n $$SCRIPT; \
done
# Checking for bashisms (currently not failing, but only listing)

View file

@ -47,7 +47,7 @@ do
if [ -n "$MAX_BACKUPS" ]
then
# Execute the delete script, delete older backup or other custom delete script
/delete.sh $db $EXT
/delete.sh "$db" $EXT
fi
else
rm -rf "$FILENAME"

3
run.sh
View file

@ -16,9 +16,8 @@ elif [ -n "${INIT_RESTORE_LATEST}" ]; then
find /backup -maxdepth 1 -name '[0-9]*.*.sql.gz' | sort | tail -1 | xargs /restore.sh
fi
function final_backup () {
function final_backup {
echo "=> Captured trap for final backup"
DATE=$(date +%Y%m%d%H%M)
echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")"
exec /backup.sh
exit 0