mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-05 09:03:53 -04:00
Scanopy: remove integrated daemon script (#11100)
This commit is contained in:
@@ -31,14 +31,13 @@ function update_script() {
|
||||
|
||||
if check_for_gh_release "scanopy" "scanopy/scanopy"; then
|
||||
msg_info "Stopping services"
|
||||
systemctl stop scanopy-daemon scanopy-server
|
||||
systemctl stop scanopy-server
|
||||
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon
|
||||
msg_ok "Stopped services"
|
||||
|
||||
msg_info "Backing up configurations"
|
||||
cp /opt/scanopy/.env /opt/scanopy.env.bak
|
||||
if [[ -f /opt/scanopy/oidc.toml ]]; then
|
||||
cp /opt/scanopy/oidc.toml /opt/scanopy.oidc.toml
|
||||
fi
|
||||
cp /opt/scanopy/.env /opt/scanopy.env
|
||||
[[ -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"
|
||||
@@ -52,12 +51,10 @@ function update_script() {
|
||||
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
|
||||
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
|
||||
|
||||
mv /opt/scanopy.env.bak /opt/scanopy/.env
|
||||
if [[ -f /opt/scanopy.oidc.toml ]]; then
|
||||
mv /opt/scanopy.oidc.toml /opt/scanopy/oidc.toml
|
||||
fi
|
||||
[[ -f /opt/scanopy.env ]] && mv /opt/scanopy.env /opt/scanopy/.env
|
||||
[[ -f /opt/scanopy.oidc.toml ]] && mv /opt/scanopy.oidc.toml /opt/scanopy/oidc.toml
|
||||
if ! grep -q "PUBLIC_URL" /opt/scanopy/.env; then
|
||||
sed -i "\|_PATH=|a\scanopy_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env
|
||||
sed -i "\|_PATH=|a\\scanopy_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env
|
||||
fi
|
||||
sed -i 's|_TARGET=.*$|_URL=http://127.0.0.1:60072|' /opt/scanopy/.env
|
||||
|
||||
@@ -81,7 +78,8 @@ function update_script() {
|
||||
msg_ok "Built scanopy-daemon"
|
||||
|
||||
msg_info "Starting services"
|
||||
systemctl start scanopy-server scanopy-daemon
|
||||
systemctl start scanopy-server
|
||||
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl start scanopy-daemon
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
@@ -95,4 +93,4 @@ msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:60072${CL}"
|
||||
echo -e "${INFO}${YW} Then create your account, and run the 'configure_daemon.sh' script to setup the daemon.${CL}"
|
||||
echo -e "${INFO}${YW} Then create your account, and create a daemon in the UI.${CL}"
|
||||
|
||||
Reference in New Issue
Block a user