From 4bd5c7b54b9beb0c6e055f46d745b5d359626660 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 4 Feb 2026 14:57:52 -0500 Subject: [PATCH] [FIX] Scanopy: ensure Scanopy Daemon update (#11541) - It wasn't updating due to it having the same name as the server - Changed it to 'Scanopy Daemon' - Other small fixes --- ct/scanopy.sh | 19 +++++++++++-------- install/scanopy-install.sh | 6 +++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ct/scanopy.sh b/ct/scanopy.sh index b4806a949..248bf0032 100644 --- a/ct/scanopy.sh +++ b/ct/scanopy.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - if check_for_gh_release "scanopy" "scanopy/scanopy"; then + if check_for_gh_release "Scanopy" "scanopy/scanopy"; then msg_info "Stopping services" systemctl stop scanopy-server [[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon @@ -40,7 +40,7 @@ function update_script() { [[ -f /opt/scanopy/oidc.toml ]] && cp /opt/scanopy/oidc.toml /opt/scanopy.oidc.toml msg_ok "Backed up configurations" - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy" ensure_dependencies pkg-config libssl-dev TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')" @@ -61,19 +61,22 @@ function update_script() { $STD npm run build msg_ok "Created frontend UI" - msg_info "Building scanopy-server (patience)" + msg_info "Building Scanopy Server (patience)" cd /opt/scanopy/backend $STD cargo build --release --bin server mv ./target/release/server /usr/bin/scanopy-server - msg_ok "Built scanopy-server" + msg_ok "Built Scanopy Server" - [[ -f /etc/systemd/system/scanopy-daemon.service ]] && - fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64" && - rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh && + if [[ -f /etc/systemd/system/scanopy-daemon.service ]]; then + fetch_and_deploy_gh_release "Scanopy Daemon" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64" + mv "/usr/local/bin/Scanopy Daemon" /usr/local/bin/scanopy-daemon + rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh sed -i -e 's|usr/bin|usr/local/bin|' \ -e 's/push/daemon_poll/' \ - -e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service && + -e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service systemctl daemon-reload + msg_ok "Updated Scanopy Daemon" + fi msg_info "Starting services" systemctl start scanopy-server diff --git a/install/scanopy-install.sh b/install/scanopy-install.sh index e832bba9b..337b7e588 100644 --- a/install/scanopy-install.sh +++ b/install/scanopy-install.sh @@ -23,7 +23,7 @@ msg_ok "Installed Dependencies" PG_VERSION=17 setup_postgresql NODE_VERSION="24" setup_nodejs PG_DB_NAME="scanopy_db" PG_DB_USER="scanopy" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db -fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy" +fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy" TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')" RUST_TOOLCHAIN=$TOOLCHAIN setup_rust @@ -35,11 +35,11 @@ $STD npm ci --no-fund --no-audit $STD npm run build msg_ok "Created frontend UI" -msg_info "Building scanopy-server (patience)" +msg_info "Building Scanopy Server (patience)" cd /opt/scanopy/backend $STD cargo build --release --bin server mv ./target/release/server /usr/bin/scanopy-server -msg_ok "Built scanopy-server" +msg_ok "Built Scanopy Server" msg_info "Configuring server for first-run" cat </opt/scanopy/.env