From 9236857ee9bf28b4a50a0ac1f77f315e4ff9581f Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Fri, 4 Sep 2026 10:35:01 +0200 Subject: [PATCH] fileflows: tolerate no pre-existing fileflows units when checking for the new Agent unit --- install/fileflows-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index b9f8272d6..1a18a3c2d 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -61,9 +61,9 @@ else read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url done cd /opt/fileflows/Agent - before_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort)" + before_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort || true)" $STD dotnet FileFlows.Agent.dll --server "$server_url" --systemd install --root true - after_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort)" + after_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort || true)" agent_unit="$(comm -13 <(echo "$before_units") <(echo "$after_units") | head -n1)" if [[ -n "$agent_unit" ]]; then systemctl enable -q --now "$agent_unit"