♻️ symlink ETC_DIR to CONF_DIR instead of dual-copy ♻️

- Replace copy-on-first-run + `__initialize_system_etc` sync loop with a symlink: after seeding `$CONF_DIR`, remove `$ETC_DIR` and point it at `$CONF_DIR` so both paths always resolve to the same config
- Drop `$ETC_DIR` from `__initialize_replace_variables` calls since the symlink makes it redundant
- Switch daemon.json, app.ini, and runner yaml config paths from `$ETC_DIR` to `$CONF_DIR` references
- Remove unused `__init_config_etc` function from entrypoint.sh

rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/05-dockerd.sh
rootfs/usr/local/etc/docker/init.d/08-gitea.sh
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
2026-06-09 15:08:17 -04:00
parent ead2bd2e19
commit c7b724bf4b
4 changed files with 38 additions and 58 deletions
@@ -417,22 +417,6 @@ __display_user_info() {
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - -
__init_config_etc() {
local copy="no"
local name="$SERVICE_NAME"
local etc_dir="${ETC_DIR:-/etc/$name}"
local conf_dir="${CONF_DIR:-/config/$name}"
__is_dir_empty "$conf_dir" && copy=yes
if [ "$copy" = "yes" ]; then
if [ -d "$etc_dir" ]; then
mkdir -p "$conf_dir"
__copy_templates "$etc_dir/." "$conf_dir/"
elif [ -f "$etc_dir" ]; then
__copy_templates "$etc_dir" "$conf_dir"
fi
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
}
__create_ssl_cert() {
local SSL_DIR="${SSL_DIR:-/etc/ssl}"
[ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh"