diff --git a/backup.sh b/backup.sh index bee0bf9..e81e9d2 100644 --- a/backup.sh +++ b/backup.sh @@ -1,7 +1,12 @@ #!/bin/bash +if [ ! -e /backups/config ]; then + echo "Config not found!" + exit 1 +fi + set -a -source .config +source /backups/config set +a set -e @@ -42,6 +47,7 @@ fi # Test, then create Lockfile if [ -e /tmp/backup.lock ]; then echo "Backups are already running! If in error, manually remove the lockfile!" + exit 1 fi touch /tmp/backup.lock @@ -74,8 +80,6 @@ if [ ! -z "$BACKUP_EXCLUDE" ]; then done fi -echo "$exclude_parsed" - if [ ! "$MAX_SPEED_KILOBYTES_SECOND" -eq 0 ]; then speed_parsed='--limit-upload '$(echo $MAX_SPEED_KILOBYTES_SECOND) fi