aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-10-29 22:18:06 +0100
committerGravatar GitHub <noreply@github.com> 2023-10-29 22:18:06 +0100
commitde51f6e7a042788532aca5e437634da8cdbbbac0 (patch)
treebc3045a4b64b0ceaeecc23d5e221ac1cf469d420 /Docker
parentbaab354ca26212eafba82d593fa052bdc782da80 (diff)
Export all environment variables to cron (#5772)
fix https://github.com/FreshRSS/FreshRSS/issues/5770 Note, the syntax complying with https://www.shellcheck.net/wiki/SC2002 does not seem to work in ash / Alpine
Diffstat (limited to 'Docker')
-rwxr-xr-xDocker/entrypoint.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index 82cc4f9a8..4f0cec6e5 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -34,13 +34,8 @@ if [ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ]; then
fi
if [ -n "$CRON_MIN" ]; then
- (
- echo "export TZ=$TZ"
- echo "export COPY_LOG_TO_SYSLOG=$COPY_LOG_TO_SYSLOG"
- echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR"
- echo "export FRESHRSS_ENV=$FRESHRSS_ENV"
- echo "export DATA_PATH=$DATA_PATH"
- ) >/var/www/FreshRSS/Docker/env.txt
+ # shellcheck disable=SC2002
+ cat /proc/self/environ | tr '\0' '\n' | grep -vE '^(HOME|PATH|PWD|SHLVL|TERM|_)=' | sort -u | sed 's/^/export /' >/var/www/FreshRSS/Docker/env.txt
sed </etc/crontab.freshrss.default \
-r "s#^[^ ]+ #$CRON_MIN #" | crontab -
fi