From 6716d8de842c5a0507f08c111f6d3c9a7bc11729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Fri, 10 Jul 2026 10:53:51 +0200 Subject: [PATCH] Fireshare: Fix for install and upgrade to v1.7.3 (#15673) * Update CHANGELOG.md (#15631) Co-authored-by: github-actions[bot] * Update CHANGELOG.md (#15631) Co-authored-by: github-actions[bot] * Update CHANGELOG.md (#15631) Co-authored-by: github-actions[bot] * Fix install and upgrade to v1.7.3 --------- Co-authored-by: community-scripts-pr-app[bot] <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] --- ct/fireshare.sh | 21 ++++++++++++++------- install/fireshare-install.sh | 3 +++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ct/fireshare.sh b/ct/fireshare.sh index 296cb6c01..f10be013b 100644 --- a/ct/fireshare.sh +++ b/ct/fireshare.sh @@ -35,12 +35,22 @@ function update_script() { systemctl stop fireshare msg_ok "Stopped Service" - mv /opt/fireshare/fireshare.env /opt + create_backup /opt/fireshare/fireshare.env CLEAN_INSTALL=1 fetch_and_deploy_gh_release "fireshare" "ShaneIsrael/fireshare" "tarball" - mv /opt/fireshare.env /opt/fireshare + restore_backup rm -f /usr/local/bin/fireshare - msg_info "Updating Fireshare" + if ! grep -q "__FIRESHARE_PORT__" /etc/nginx/nginx.conf; then + cp /opt/fireshare/app/nginx/prod.conf /etc/nginx/nginx.conf + sed -i 's|root /processed/|root /opt/fireshare-processed/|g' /etc/nginx/nginx.conf + sed -i 's/^user[[:space:]]\+nginx;/user root;/' /etc/nginx/nginx.conf + sed -i 's|root[[:space:]]\+/app/build;|root /opt/fireshare/app/client/build;|' /etc/nginx/nginx.conf + sed -i 's/__FIRESHARE_PORT__/80/g' /etc/nginx/nginx.conf + cp /opt/fireshare/app/nginx/error.html /etc/nginx/ + cp /opt/fireshare/app/nginx/api_unavailable.html /etc/nginx/ + fi + msg_info "Configuring Fireshare" + cd /opt/fireshare $STD uv venv --clear $STD .venv/bin/python -m ensurepip --upgrade @@ -53,13 +63,10 @@ function update_script() { export VIDEO_DIRECTORY=/opt/fireshare-videos export PROCESSED_DIRECTORY=/opt/fireshare-processed $STD uv run flask db upgrade - - msg_info "Building Fireshare Client" cd /opt/fireshare/app/client $STD npm install $STD npm run build - msg_ok "Built Fireshare Client" - msg_ok "Updated Fireshare" + msg_ok "Configured Fireshare" msg_info "Starting Service" systemctl start fireshare diff --git a/install/fireshare-install.sh b/install/fireshare-install.sh index 982679c6e..311ba230b 100644 --- a/install/fireshare-install.sh +++ b/install/fireshare-install.sh @@ -141,6 +141,9 @@ cp /opt/fireshare/app/nginx/prod.conf /etc/nginx/nginx.conf sed -i 's|root /processed/|root /opt/fireshare-processed/|g' /etc/nginx/nginx.conf sed -i 's/^user[[:space:]]\+nginx;/user root;/' /etc/nginx/nginx.conf sed -i 's|root[[:space:]]\+/app/build;|root /opt/fireshare/app/client/build;|' /etc/nginx/nginx.conf +sed -i 's/__FIRESHARE_PORT__/80/g' /etc/nginx/nginx.conf +cp /opt/fireshare/app/nginx/error.html /etc/nginx/ +cp /opt/fireshare/app/nginx/api_unavailable.html /etc/nginx/ systemctl start nginx cat <~/fireshare.creds