Merge claude/1

This commit is contained in:
librelad 2026-05-24 14:52:41 +01:00
commit 6f7c239753

View File

@ -24,12 +24,17 @@ installLibrePortalWebUITaskService()
# back to /var/run/docker.sock (which rootless does not create) and any
# `docker …` call inside the task would fail. Rootful gets no extras —
# the default /var/run path is already correct.
#
# The rootless daemon runs as the DOCKER INSTALL USER, so its socket lives in
# that user's runtime dir — not the manager's. Use the docker install user's
# uid here (matches dockerCommandRunInstallUser); pointing at the manager's
# uid was wrong — that socket doesn't exist.
local service_env_block=""
if [[ "$CFG_DOCKER_INSTALL_TYPE" == "rootless" ]]; then
local libreportal_uid
libreportal_uid="$(id -u "$sudo_user_name")"
service_env_block="Environment=DOCKER_HOST=unix:///run/user/${libreportal_uid}/docker.sock
Environment=XDG_RUNTIME_DIR=/run/user/${libreportal_uid}"
local docker_install_uid
docker_install_uid="$(id -u "$CFG_DOCKER_INSTALL_USER")"
service_env_block="Environment=DOCKER_HOST=unix:///run/user/${docker_install_uid}/docker.sock
Environment=XDG_RUNTIME_DIR=/run/user/${docker_install_uid}"
fi
# Create systemd service file