entrypoint.sh 758 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. php -f ./cli/prepare.php >/dev/null
  3. chown -R :www-data .
  4. chmod -R g+r . && chmod -R g+w ./data/
  5. find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \;
  6. find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?post_max_size#s#^.*#post_max_size = 32M#" {} \;
  7. find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?upload_max_filesize#s#^.*#upload_max_filesize = 32M#" {} \;
  8. if [ -n "$CRON_MIN" ]; then
  9. (
  10. echo "export TZ=$TZ"
  11. echo "export COPY_LOG_TO_SYSLOG=$COPY_LOG_TO_SYSLOG"
  12. echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR"
  13. echo "export FRESHRSS_ENV=$FRESHRSS_ENV"
  14. ) >/var/www/FreshRSS/Docker/env.txt
  15. crontab -l | sed -r "\\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab -
  16. fi
  17. exec "$@"