Compare commits

..

No commits in common. "6f7c239753a9da56a1c7671b15125d375fb2a41b" and "d93bc9a864a933d34dc8c62a69ac1b661a7f1093" have entirely different histories.

View File

@ -24,17 +24,12 @@ installLibrePortalWebUITaskService()
# back to /var/run/docker.sock (which rootless does not create) and any # back to /var/run/docker.sock (which rootless does not create) and any
# `docker …` call inside the task would fail. Rootful gets no extras — # `docker …` call inside the task would fail. Rootful gets no extras —
# the default /var/run path is already correct. # 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="" local service_env_block=""
if [[ "$CFG_DOCKER_INSTALL_TYPE" == "rootless" ]]; then if [[ "$CFG_DOCKER_INSTALL_TYPE" == "rootless" ]]; then
local docker_install_uid local libreportal_uid
docker_install_uid="$(id -u "$CFG_DOCKER_INSTALL_USER")" libreportal_uid="$(id -u "$sudo_user_name")"
service_env_block="Environment=DOCKER_HOST=unix:///run/user/${docker_install_uid}/docker.sock service_env_block="Environment=DOCKER_HOST=unix:///run/user/${libreportal_uid}/docker.sock
Environment=XDG_RUNTIME_DIR=/run/user/${docker_install_uid}" Environment=XDG_RUNTIME_DIR=/run/user/${libreportal_uid}"
fi fi
# Create systemd service file # Create systemd service file