Fix typos and improve Docker availability checks in backup scripts
All checks were successful
Build a dev image / build (push) Successful in 11s

This commit is contained in:
Adam Štrauch 2025-10-18 19:42:14 +02:00
parent 89deb6eec9
commit 5bfbda5e5e
Signed by: cx
GPG key ID: 7262DAFE292BCE20
3 changed files with 6 additions and 3 deletions

View file

@ -5,7 +5,8 @@ if [ "$1" = "local" ]; then
elif [ "$1" = "restic" ]; then
source /backup_restic.sh
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
sleep 86400
done

View file

@ -16,7 +16,8 @@ if [ -z "$TARGET_DIR" ]; then
exit 1
fi
if [ ! `docker info` ]; then
docker info > /dev/null 2>&1
if [ ! $? -eq 0 ]; then
echo "Docker is not available."
exit 1
fi

View file

@ -22,7 +22,8 @@ if [ -z "$RESTIC_REPOSITORY" ]; then
exit 1
fi
if [ ! `docker info` ]; then
docker info > /dev/null 2>&1
if [ ! $? -eq 0 ]; then
echo "Docker is not available."
exit 1
fi