Make crond run as PID 1
This minor update to the /entry.sh script runs "crond" via "exec" to ensure it ends up as PID 1 in the container.
This commit is contained in:
parent
de9eac760b
commit
14dac9630a
@ -56,13 +56,7 @@ RUN for verb in help \
|
|||||||
printf -- "%b" "#!/usr/bin/env sh\n/root/.acme.sh/acme.sh --${verb} --config-home /acme.sh \"\$@\"" >/usr/local/bin/--${verb} && chmod +x /usr/local/bin/--${verb} \
|
printf -- "%b" "#!/usr/bin/env sh\n/root/.acme.sh/acme.sh --${verb} --config-home /acme.sh \"\$@\"" >/usr/local/bin/--${verb} && chmod +x /usr/local/bin/--${verb} \
|
||||||
; done
|
; done
|
||||||
|
|
||||||
RUN printf "%b" '#!'"/usr/bin/env sh\n \
|
RUN printf '#!/usr/bin/env sh\n\nif [ "$1" = "daemon" ]; then\n exec crond -f\nfi\n\nexec -- "$@"\n' >/entry.sh && chmod +x /entry.sh
|
||||||
if [ \"\$1\" = \"daemon\" ]; then \n \
|
|
||||||
trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
|
|
||||||
crond && while true; do sleep 1; done;\n \
|
|
||||||
else \n \
|
|
||||||
exec -- \"\$@\"\n \
|
|
||||||
fi" >/entry.sh && chmod +x /entry.sh
|
|
||||||
|
|
||||||
VOLUME /acme.sh
|
VOLUME /acme.sh
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user