Fixed if on line 4 to accept default 0 value

This commit is contained in:
g.nardiello 2023-01-05 11:44:39 +01:00
parent 3011a8770a
commit 218bc5778c

2
run.sh
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
tail -F /mysql_backup.log & tail -F /mysql_backup.log &
if [ "${INIT_BACKUP}" -gt "0" ]; then if [ "${INIT_BACKUP:-0}" -gt "0" ]; then
echo "=> Create a backup on the startup" echo "=> Create a backup on the startup"
/backup.sh /backup.sh
elif [ -n "${INIT_RESTORE_LATEST}" ]; then elif [ -n "${INIT_RESTORE_LATEST}" ]; then