diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 863901316..07cf62d8e 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -37,17 +37,12 @@ function update_script() { msg_info "Stopped Service" msg_info "Creating Backup" + ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" tar -czf "$backup_filename" -C /opt/fileflows Data msg_ok "Backup Created" - msg_info "Updating $APP to latest version" - temp_file=$(mktemp) - curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file" - $STD unzip -o -d /opt/fileflows "$temp_file" - rm -rf "$temp_file" - rm -rf "$backup_filename" - msg_ok "Updated $APP to latest version" + fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows" msg_info "Starting Service" systemctl start fileflows diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 3b452fc3b..0043a0edd 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -15,31 +15,30 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ +$STD apt install -y \ ffmpeg \ - jq \ imagemagick msg_ok "Installed Dependencies" setup_hwaccel msg_info "Installing ASP.NET Core Runtime" -curl -fsSL https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -o packages-microsoft-prod.deb -$STD dpkg -i packages-microsoft-prod.deb -rm -rf packages-microsoft-prod.deb -$STD apt-get update -$STD apt-get install -y aspnetcore-runtime-8.0 +setup_deb822_repo \ + "microsoft" \ + "https://packages.microsoft.com/keys/microsoft-2025.asc" \ + "https://packages.microsoft.com/debian/13/prod/" \ + "trixie" +$STD apt install -y aspnetcore-runtime-8.0 msg_ok "Installed ASP.NET Core Runtime" +fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows" + msg_info "Setup FileFlows" $STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg $STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe -temp_file=$(mktemp) -curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file" -$STD unzip -d /opt/fileflows "$temp_file" -$STD bash -c "cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true" +cd /opt/fileflows/Server +dotnet FileFlows.Server.dll --systemd install --root true systemctl enable -q --now fileflows -rm -f "$temp_file" msg_ok "Setup FileFlows" motd_ssh