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 "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