diff --git a/Dockerfile b/Dockerfile index 7a622a2..850a472 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,4 +29,4 @@ COPY entrypoint.sh /var/entrypoint.sh RUN chmod +x /var/entrypoint.sh ENTRYPOINT [ "/var/entrypoint.sh" ] -CMD ["cron" "-f"] +CMD ["cron", "-f"] diff --git a/README.md b/README.md index d0ae747..eb9be8b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Borg backup cron A docker image to backup periodically a folder using borg. Additionnally this image can dump a mysql database in the same folder beforehand. +You can also run the cron job directly by overriding the command with `/var/backup_script.sh` Build ----- diff --git a/entrypoint.sh b/entrypoint.sh index 5404c5d..c63310a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,6 @@ #!/bin/bash -bash set -eo pipefail +set -eo pipefail +shopt -s nullglob # Add known hosts if [[ -n "$SSH_KNOWN_HOSTS" ]]; then