entrypoint.sh 715 B

123456789101112131415161718192021
  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. ) >/var/www/FreshRSS/Docker/env.txt
  14. crontab -l | sed -r "\\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab -
  15. fi
  16. exec "$@"