fileflows: update install path for Node->Agent rename, detect service unit dynamically

This commit is contained in:
MickLesk
2026-09-04 10:23:58 +02:00
parent 2808127904
commit e6e2d6f6d0

View File

@@ -45,7 +45,7 @@ $STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg
$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
$STD rm -rf /opt/fileflows/Server/runtimes/win-*
read -r -p "${TAB3}Do you want to install FileFlows Server or Node? (S/N): " install_server
read -r -p "${TAB3}Do you want to install FileFlows Server or Agent? (S/A): " install_server
if [[ "$install_server" =~ ^[Ss]$ ]]; then
msg_info "Installing FileFlows Server"
@@ -54,16 +54,23 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then
systemctl enable -q --now fileflows
msg_ok "Installed FileFlows Server"
else
msg_info "Installing FileFlows Node"
msg_info "Installing FileFlows Agent"
stop_spinner
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
while [[ -z "${server_url// /}" ]]; do
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
done
cd /opt/fileflows/Node
$STD dotnet FileFlows.Node.dll --server "$server_url" --systemd install --root true
systemctl enable -q --now fileflows-node
msg_ok "Installed FileFlows Node"
cd /opt/fileflows/Agent
before_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort)"
$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)"
agent_unit="$(comm -13 <(echo "$before_units") <(echo "$after_units") | head -n1)"
if [[ -n "$agent_unit" ]]; then
systemctl enable -q --now "$agent_unit"
else
msg_warn "Could not detect the FileFlows Agent systemd unit; start it manually (systemctl list-unit-files 'fileflows*')."
fi
msg_ok "Installed FileFlows Agent"
fi
motd_ssh