diff options
Diffstat (limited to 'scripts/entrypoint.sh')
-rw-r--r-- | scripts/entrypoint.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 4d89be5..e40b462 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -22,6 +22,20 @@ EOF i=$((i+1)) done +i=0 +while true; do + key="DELETE_UNLINKED_${i}_NAME" + val="DELETE_UNLINKED_${i}_AGE" + if [ -z "${!key:-}" ]; then + break + fi + cat <<EOF >> /etc/cron.d/crontab +DELETE_UNLINKED_TAG_${i}=${!key} +DELETE_UNLINKED_AGE_${i}=${!val} +EOF + i=$((i+1)) +done + echo "${CRON_EXPRESSION:-* * * * *} /bin/bash /scripts/cron.sh >/proc/1/fd/1 2>/proc/1/fd/2" >> /etc/cron.d/crontab cat /etc/cron.d/crontab crontab /etc/cron.d/crontab |