diff options
| author | 2023-10-31 23:36:23 +0100 | |
|---|---|---|
| committer | 2023-10-31 23:36:23 +0100 | |
| commit | 72aaea86367797f292d296524a609f05ff175b1c (patch) | |
| tree | 168f63a4603ca264228054cf3cae1aab2bdbc233 /Docker | |
| parent | a5748ad74f1c13eda0efd82e6b9f8392bbe3770b (diff) | |
Fix Docker CRON_MIN for env with special characters (#5795)
fix https://github.com/FreshRSS/FreshRSS/issues/5792
regression from https://github.com/FreshRSS/FreshRSS/pull/5772
Diffstat (limited to 'Docker')
| -rwxr-xr-x | Docker/entrypoint.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index 4f0cec6e5..55936682b 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -34,8 +34,7 @@ if [ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ]; then fi if [ -n "$CRON_MIN" ]; then - # 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 + 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 sed </etc/crontab.freshrss.default \ -r "s#^[^ ]+ #$CRON_MIN #" | crontab - fi |
