Snowshare: fix update script (#11726)

* Snowshare: fix update error

* Implement upload backup and restore in update script

Added backup and restore functionality for uploads during the Snowshare update process.

---------

Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
This commit is contained in:
Romain PINSOLLE
2026-02-11 10:33:55 +01:00
committed by GitHub
parent 216b389635
commit f34f994560

View File

@@ -33,7 +33,15 @@ function update_script() {
systemctl stop snowshare
msg_ok "Stopped Service"
fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
msg_info "Backing up uploads"
[ -d /opt/snowshare/uploads ] && cp -a /opt/snowshare/uploads /opt/.snowshare_uploads_backup
msg_ok "Uploads backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
msg_info "Restoring uploads"
[ -d /opt/.snowshare_uploads_backup ] && rm -rf /opt/snowshare/uploads && cp -a /opt/.snowshare_uploads_backup /opt/snowshare/uploads
msg_ok "Uploads restored"
msg_info "Updating Snowshare"
cd /opt/snowshare