10-init.sh 409 B

12345678910111213141516
  1. # Install crontab files
  2. if [[ -d "/opt/docker/etc/cron" ]]; then
  3. mkdir -p /etc/cron.d/
  4. find /opt/docker/etc/cron -type f | while read CRONTAB_FILE; do
  5. # fix permissions
  6. chmod 0644 -- "$CRONTAB_FILE"
  7. # add newline, cron needs this
  8. echo >> "$CRONTAB_FILE"
  9. # Install files
  10. cp -a -- "$CRONTAB_FILE" "/etc/cron.d/$(basename "$CRONTAB_FILE")"
  11. done
  12. fi