diff options
| author | 2023-11-21 16:33:19 +0100 | |
|---|---|---|
| committer | 2023-11-21 16:33:19 +0100 | |
| commit | bc9ef0d188fa43d4a4d06835f74e2d94799b65c6 (patch) | |
| tree | 79ee10e49b04ea95a89b4f7e1ee19a2c66fd9e8b /Docker | |
| parent | b65ea979010eb488cc9c1fb1d0f082e868c191d5 (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
Diffstat (limited to 'Docker')
| -rwxr-xr-x | Docker/entrypoint.sh | 2 |
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 |
