Compare commits

...

3 Commits

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 ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
$STD rm -rf /opt/fileflows/Server/runtimes/win-* $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 if [[ "$install_server" =~ ^[Ss]$ ]]; then
msg_info "Installing FileFlows Server" msg_info "Installing FileFlows Server"
@@ -54,15 +54,23 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then
systemctl enable -q --now fileflows systemctl enable -q --now fileflows
msg_ok "Installed FileFlows Server" msg_ok "Installed FileFlows Server"
else 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 read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
while [[ -z "${server_url// /}" ]]; do while [[ -z "${server_url// /}" ]]; do
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
done done
cd /opt/fileflows/Node cd /opt/fileflows/Agent
$STD dotnet FileFlows.Node.dll --server "$server_url" --systemd install --root true before_units="$(systemctl list-unit-files 'fileflows*' --no-legend 2>/dev/null | awk '{print $1}' | sort || true)"
systemctl enable -q --now fileflows-node $STD dotnet FileFlows.Agent.dll --server "$server_url" --systemd install --root true
msg_ok "Installed FileFlows Node" 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"
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 fi
motd_ssh motd_ssh