diff --git a/rootfs/usr/local/etc/docker/init.d/05-dockerd.sh b/rootfs/usr/local/etc/docker/init.d/05-dockerd.sh index 206ab3a..e6558cf 100755 --- a/rootfs/usr/local/etc/docker/init.d/05-dockerd.sh +++ b/rootfs/usr/local/etc/docker/init.d/05-dockerd.sh @@ -263,11 +263,11 @@ __run_precopy() { # Define environment local hostname=${HOSTNAME} [ -d "/run/healthcheck" ] || mkdir -p "/run/healthcheck" - # Seed /config/$SERVICE_NAME from the baked /etc copy on first run, + # Seed /config/$SERVICE_NAME from the baked /etc copy if daemon.json is missing, # then replace the /etc/$SERVICE_NAME directory with a symlink to /config/$SERVICE_NAME # so both paths always resolve to the same processed config. if [ -d "$ETC_DIR" ] && ! [ -L "$ETC_DIR" ]; then - if __is_dir_empty "$CONF_DIR"; then + if [ ! -f "$CONF_DIR/daemon.json" ]; then mkdir -p "$CONF_DIR" cp -Rf "$ETC_DIR/." "$CONF_DIR/" 2>/dev/null || true fi diff --git a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh index 7dc63e2..7a06c71 100755 --- a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh +++ b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh @@ -304,11 +304,11 @@ __run_precopy() { # during container startup, after the entrypoint's initial copy. Applying it here # (in the init.d phase) ensures it takes effect after Docker finishes network setup. [ -f "/usr/local/etc/resolv.conf" ] && cp -f "/usr/local/etc/resolv.conf" "/etc/resolv.conf" 2>/dev/null || true - # Seed /config/$SERVICE_NAME from the baked /etc copy on first run, + # Seed /config/$SERVICE_NAME from the baked /etc copy if app.ini is missing, # then replace the /etc/$SERVICE_NAME directory with a symlink to /config/$SERVICE_NAME # so both paths always resolve to the same processed config. if [ -d "$ETC_DIR" ] && ! [ -L "$ETC_DIR" ]; then - if __is_dir_empty "$CONF_DIR"; then + if [ ! -f "$CONF_DIR/app.ini" ]; then mkdir -p "$CONF_DIR" cp -Rf "$ETC_DIR/." "$CONF_DIR/" 2>/dev/null || true fi diff --git a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh index 9f86445..a244991 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh @@ -333,11 +333,11 @@ __run_precopy() { # Define environment local hostname=${HOSTNAME} [ -d "/run/healthcheck" ] || mkdir -p "/run/healthcheck" - # Seed /config/$SERVICE_NAME from the baked /etc copy on first run, + # Seed /config/$SERVICE_NAME from the baked /etc copy if default_config.yaml is missing, # then replace the /etc/$SERVICE_NAME directory with a symlink to /config/$SERVICE_NAME # so both paths always resolve to the same processed config. if [ -d "$ETC_DIR" ] && ! [ -L "$ETC_DIR" ]; then - if __is_dir_empty "$CONF_DIR"; then + if [ ! -f "$CONF_DIR/default_config.yaml" ]; then mkdir -p "$CONF_DIR" cp -Rf "$ETC_DIR/." "$CONF_DIR/" 2>/dev/null || true fi