From 1d609976d35492ba6723a838912d7551a2f3ab10 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:02:29 +0200 Subject: [PATCH] Slskd: Remove stale Soularr lock file on startup and redirect logs to stderr (#13669) * Slskd: Remove stale Soularr lock file on startup and redirect logs to stderr * fix(slskd): inline LOCK_FILE variable --- install/slskd-install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install/slskd-install.sh b/install/slskd-install.sh index d56f37e28..448839a71 100644 --- a/install/slskd-install.sh +++ b/install/slskd-install.sh @@ -48,12 +48,15 @@ if [[ ${soularr,,} =~ ^(y|yes)$ ]]; then #!/usr/bin/env bash if ps aux | grep "[s]oularr.py" >/dev/null; then - echo "Soularr is already running. Exiting..." + echo "Soularr is already running. Exiting..." >&2 exit 1 -else - source /opt/soularr/venv/bin/activate - uv run python3 -u /opt/soularr/soularr.py --config-dir /opt/soularr fi + +# Remove stale lock file from previous ungraceful exit +rm -f "/opt/soularr/.soularr.lock" + +source /opt/soularr/venv/bin/activate +uv run python3 -u /opt/soularr/soularr.py --config-dir /opt/soularr 2>&1 EOF chmod +x /opt/soularr/run.sh deactivate