Refactor: FileFlows (#11108)

* Refactor

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021
This commit is contained in:
Slaviša Arežina
2026-02-09 14:16:04 +01:00
committed by GitHub
parent a330afde03
commit 3d2bc05092
2 changed files with 13 additions and 19 deletions

View File

@@ -37,17 +37,12 @@ function update_script() {
msg_info "Stopped Service" msg_info "Stopped Service"
msg_info "Creating Backup" msg_info "Creating Backup"
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
tar -czf "$backup_filename" -C /opt/fileflows Data tar -czf "$backup_filename" -C /opt/fileflows Data
msg_ok "Backup Created" msg_ok "Backup Created"
msg_info "Updating $APP to latest version" fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
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"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start fileflows systemctl start fileflows

View File

@@ -15,31 +15,30 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt install -y \
ffmpeg \ ffmpeg \
jq \
imagemagick imagemagick
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
setup_hwaccel setup_hwaccel
msg_info "Installing ASP.NET Core Runtime" 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 setup_deb822_repo \
$STD dpkg -i packages-microsoft-prod.deb "microsoft" \
rm -rf packages-microsoft-prod.deb "https://packages.microsoft.com/keys/microsoft-2025.asc" \
$STD apt-get update "https://packages.microsoft.com/debian/13/prod/" \
$STD apt-get install -y aspnetcore-runtime-8.0 "trixie"
$STD apt install -y aspnetcore-runtime-8.0
msg_ok "Installed ASP.NET Core Runtime" msg_ok "Installed ASP.NET Core Runtime"
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
msg_info "Setup FileFlows" msg_info "Setup FileFlows"
$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg $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
temp_file=$(mktemp) cd /opt/fileflows/Server
curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file" dotnet FileFlows.Server.dll --systemd install --root true
$STD unzip -d /opt/fileflows "$temp_file"
$STD bash -c "cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true"
systemctl enable -q --now fileflows systemctl enable -q --now fileflows
rm -f "$temp_file"
msg_ok "Setup FileFlows" msg_ok "Setup FileFlows"
motd_ssh motd_ssh