You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
760 B

  1. #!/bin/bash
  2. ##
  3. ## /var/log might be plugged into an empty volume for saving logs, so we
  4. ## must make sure that /var/log/exim4 exists and has correct permissions.
  5. mkdir -p /var/log/exim4
  6. chmod -R u+rw /var/log/exim4
  7. chown -R Debian-exim /var/log/exim4
  8. echo "Propagating docker shell environment variables to CRON scripts."
  9. rm -f /etc/cron.d/*
  10. cp -a /etc/cron/* /etc/cron.d/
  11. for f in /etc/crontab /etc/cron.d/*; do
  12. [ -e "$f" ] || continue
  13. mv "$f" /tmp/tempfile
  14. {
  15. declare -xp | egrep '_PORT_[0-9]+_' | sed -r 's/^declare -x //g'
  16. echo "TZ=$TZ"
  17. echo
  18. cat /tmp/tempfile
  19. } > "$f"
  20. rm /tmp/tempfile
  21. done
  22. echo "Launching cron."
  23. ## Give back PID 1, so that cron process receives signals.
  24. exec /usr/sbin/cron -f