diff --git a/Dockerfile b/Dockerfile index 0ded025..9e1f770 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ ENV RESTIC_PASSWORD="" ENV RESTIC_TAG="" ENV NFS_TARGET="" ENV BACKUP_CRON="0 */6 * * *" +ENV RESTIC_INIT_ARGS="" ENV RESTIC_FORGET_ARGS="" ENV RESTIC_JOB_ARGS="" ENV MAILX_ARGS="" diff --git a/entry.sh b/entry.sh index 78558f3..7be1768 100755 --- a/entry.sh +++ b/entry.sh @@ -7,13 +7,13 @@ if [ -n "${NFS_TARGET}" ]; then mount -o nolock -v ${NFS_TARGET} /mnt/restic fi -restic snapshots &>/dev/null +restic snapshots ${RESTIC_INIT_ARGS} &>/dev/null status=$? echo "Check Repo status $status" if [ $status != 0 ]; then echo "Restic repository '${RESTIC_REPOSITORY}' does not exists. Running restic init." - restic init + restic init ${RESTIC_INIT_ARGS} init_status=$? echo "Repo init status $init_status" @@ -37,4 +37,4 @@ crond echo "Container started." -exec "$@" \ No newline at end of file +exec "$@"