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.
This commit is contained in:
Jake Buchholz 2020-04-04 12:57:28 -07:00
parent ca19bbd366
commit 182d7d9b56

View File

@ -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 \