mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-29 13:36:00 +00:00
[FEAT] Scanopy: automatically update integrated daemon (#11506)
This commit is contained in:
+8
-1
@@ -67,11 +67,18 @@ function update_script() {
|
|||||||
mv ./target/release/server /usr/bin/scanopy-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 &&
|
||||||
|
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 &&
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
msg_info "Starting services"
|
msg_info "Starting services"
|
||||||
systemctl start scanopy-server
|
systemctl start scanopy-server
|
||||||
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl start scanopy-daemon
|
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl start scanopy-daemon
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
msg_warn "Update your integrated daemon via the UI"
|
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user