Browse Source

Docker crontab fixes

Reinstall crontab when container is run in 'daemon' mode.
This is necessary to...
* use a new random minute instead of the one determined at build time
* respect any acme.sh environment variables being passed to the container.
pull/2838/head
Jake Buchholz 5 years ago
parent
commit
182d7d9b56
  1. 2
      Dockerfile

2
Dockerfile

@ -58,6 +58,8 @@ RUN for verb in help \
RUN printf "%b" '#!'"/usr/bin/env sh\n \ RUN printf "%b" '#!'"/usr/bin/env sh\n \
if [ \"\$1\" = \"daemon\" ]; then \n \ if [ \"\$1\" = \"daemon\" ]; then \n \
acme.sh --uninstall-cronjob \n \
acme.sh --install-cronjob \n \
trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \ trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
crond && while true; do sleep 1; done;\n \ crond && while true; do sleep 1; done;\n \
else \n \ else \n \

Loading…
Cancel
Save