docker-volume-backup/entrypoint.sh

15 lines
346 B
Bash
Raw Normal View History

2021-04-02 13:59:47 +02:00
#!/bin/sh
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
# SPDX-License-Identifier: MPL-2.0
set -e
BACKUP_CRON_EXPRESSION="${BACKUP_CRON_EXPRESSION:-@daily}"
2021-04-03 09:33:11 +02:00
echo "Installing cron.d entry with expression $BACKUP_CRON_EXPRESSION."
2021-04-02 13:59:47 +02:00
echo "$BACKUP_CRON_EXPRESSION backup 2>&1" | crontab -
2021-04-03 09:33:11 +02:00
echo "Starting cron in foreground."
2021-04-02 13:59:47 +02:00
crond -f -l 8