#!/bin/sh set -e echo "[entrypoint] === FreshRSS starting (v4) ===" echo "[entrypoint] TZ=$TZ DATA_PATH=$DATA_PATH" # ── 1. Ensure data directories exist ────────────────────────────── mkdir -p "$DATA_PATH" "$DATA_PATH/users/admin" "$DATA_PATH/users/_/" mkdir -p "$DATA_PATH/cache" "$DATA_PATH/favicons" "$DATA_PATH/tokens" mkdir -p /data/extensions /data/log mkdir -p /data/PubSubHubbub/feeds /data/PubSubHubbub/keys mkdir -p /data/Retry-After # ── 2. Run official entrypoint (install + user create + cron) ──── echo "[entrypoint] running official FreshRSS entrypoint..." /var/www/FreshRSS/Docker/entrypoint.sh || true echo "[entrypoint] official entrypoint done" # ── 3. Override Apache to run as root ───────────────────────────── # HF storage bucket is FUSE — chown/chmod don't work on mounted files. # Running Apache as root is the only way to get write access. export APACHE_RUN_USER=root export APACHE_RUN_GROUP=root echo "[entrypoint] Apache will run as root (storage bucket workaround)" # ── 4. Start cron ──────────────────────────────────────────────── if [ -n "$CRON_MIN" ]; then if command -v cron >/dev/null 2>&1; then cron || true echo "[entrypoint] cron started" fi fi # ── 5. Start Apache ────────────────────────────────────────────── . /etc/apache2/envvars 2>/dev/null || true echo "[entrypoint] starting Apache on port $LISTEN (user=$APACHE_RUN_USER)" exec apache2 -D FOREGROUND