Fix typos and improve Docker availability checks in backup scripts
All checks were successful
Build a dev image / build (push) Successful in 11s
All checks were successful
Build a dev image / build (push) Successful in 11s
This commit is contained in:
parent
89deb6eec9
commit
5bfbda5e5e
3 changed files with 6 additions and 3 deletions
|
|
@ -5,7 +5,8 @@ if [ "$1" = "local" ]; then
|
||||||
elif [ "$1" = "restic" ]; then
|
elif [ "$1" = "restic" ]; then
|
||||||
source /backup_restic.sh
|
source /backup_restic.sh
|
||||||
elif [ "$1" = "loop" ]; then
|
elif [ "$1" = "loop" ]; then
|
||||||
# Inifinite loop to keep the container running and let Ofelia scheduler (or any other) manage the execution
|
# Infinite loop to keep the container running and let Ofelia scheduler (or any other) manage the execution
|
||||||
|
echo "Entering infinite loop mode. Use external scheduler to trigger backups."
|
||||||
while true; do
|
while true; do
|
||||||
sleep 86400
|
sleep 86400
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ if [ -z "$TARGET_DIR" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! `docker info` ]; then
|
docker info > /dev/null 2>&1
|
||||||
|
if [ ! $? -eq 0 ]; then
|
||||||
echo "Docker is not available."
|
echo "Docker is not available."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ if [ -z "$RESTIC_REPOSITORY" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! `docker info` ]; then
|
docker info > /dev/null 2>&1
|
||||||
|
if [ ! $? -eq 0 ]; then
|
||||||
echo "Docker is not available."
|
echo "Docker is not available."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue