mirror of https://github.com/FreshRSS/FreshRSS.git
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
This commit is contained in:
parent
baab354ca2
commit
de51f6e7a0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue