Closed MarcelWaldvogel closed 3 years ago
I will try it. I made the mistake before, trusting some documentation and cron jobs ended up not having the ENVs. One need to actually see the job running from cron (not manually trigger it in bash) to confirm.
Yes, documentation can indeed be misleading.
I am running this version on the two servers I mentioned previously and have
env
or with-contenv env
every minute, and without with-contenv
, it just prints HOME
, LOGNAME
, PATH
, SHELL
, and PWD
; with with-contenv
, it prints DOMAINS
etc. as well.renew
and logrotate
. I got output for all the renewal deferrals. It did not rotate logs, however (see another issue).
While trying to understand the
s6-overlay
andhttps-portal
workings more in depth for #261, I noticed thats6-overlay
provideswith-contenv
. Using that obviates the need for maintaining the environment in/etc/cron_env.sh
a second time. This PR makes things mores6-overlay
-ish (and simplifies operation). This addresses question 1 from #260.logrotate
and its children do not require the environmentwith-contenv
loads the container environment for/bin/renew
#!
line ofrenew
, but keeping it here reminds other cron users of the non-automatic environment(When reading the
s6-overlay
documentation, I got the impression that just settingS6_KEEP_ENV
globally (i.e., from the Dockerfile) would make the Dockerfile environment available to all processes. However, this does not seem to be the case, it just suppressed reloading the environment in childwith-contenv
-based processes.)