aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-11-21 16:33:19 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-21 16:33:19 +0100
commitbc9ef0d188fa43d4a4d06835f74e2d94799b65c6 (patch)
tree79ee10e49b04ea95a89b4f7e1ee19a2c66fd9e8b
parentb65ea979010eb488cc9c1fb1d0f082e868c191d5 (diff)
Improve filtering of Cron env variables (#5898)
Avoid keeping environment variables used for init. Improvement of https://github.com/FreshRSS/FreshRSS/pull/5795 Spotted when checking https://github.com/FreshRSS/FreshRSS/issues/5894
-rwxr-xr-xDocker/entrypoint.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index 55936682b..7a12842a5 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -34,7 +34,7 @@ if [ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ]; then
fi
if [ -n "$CRON_MIN" ]; then
- awk -v RS='\0' '!/^(HOME|PATH|PWD|SHLVL|TERM|_)/ {gsub("\047", "\047\\\047\047"); print "export \047" $0 "\047"}' /proc/self/environ >/var/www/FreshRSS/Docker/env.txt
+ awk -v RS='\0' '!/^(FRESHRSS_INSTALL|FRESHRSS_USER|HOME|PATH|PWD|SHLVL|TERM|_)=/ {gsub("\047", "\047\\\047\047"); print "export \047" $0 "\047"}' /proc/self/environ >/var/www/FreshRSS/Docker/env.txt
sed </etc/crontab.freshrss.default \
-r "s#^[^ ]+ #$CRON_MIN #" | crontab -
fi