docker-cmd-cron.sh 235 B

123456789101112131415
  1. #!/bin/sh
  2. cp .crontab.docker /tmp/.crontab
  3. sed -i "s~SYNUPKEEP_DOCKER_CRON_SCHEDULE~$SYNUPKEEP_DOCKER_CRON_SCHEDULE~g" /tmp/.crontab
  4. stop() {
  5. pkill supercronic
  6. sleep 1
  7. }
  8. trap "stop" SIGTERM
  9. supercronic /tmp/.crontab &
  10. wait $!