Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

feat(sensor-proxy): improve turnkey setup experience with Pulse restart handling

rcourtman497f94f4e84e
diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh
index 47858b5133..aab35043f4 100755
--- a/scripts/install-sensor-proxy.sh
+++ b/scripts/install-sensor-proxy.sh
@@ -993,7 +993,7 @@ EOF
# Parse arguments first to check for standalone mode
CTID=""
-VERSION="latest"
+VERSION="v4.32.0"
LOCAL_BINARY=""
QUIET=false
PULSE_SERVER=""
@@ -1002,6 +1002,7 @@ HTTP_MODE=false
HTTP_ADDR=":8443"
FALLBACK_BASE="${PULSE_SENSOR_PROXY_FALLBACK_URL:-}"
SKIP_RESTART=false
+RESTART_PULSE=false
UNINSTALL=false
PURGE=false
CONTROL_PLANE_TOKEN=""
@@ -1046,6 +1047,10 @@ while [[ $# -gt 0 ]]; do
SKIP_RESTART=true
shift
;;
+ --restart-pulse)
+ RESTART_PULSE=true
+ shift
+ ;;
--uninstall)
UNINSTALL=true
shift
@@ -3272,6 +3277,43 @@ else
echo ""
fi
+ # Check if Pulse needs to be restarted to pick up the proxy registration
+ PULSE_RESTART_CMD=""
+ if systemctl is-active --quiet pulse 2>/dev/null; then
+ PULSE_RESTART_CMD="systemctl restart pulse"
+ elif systemctl is-active --quiet pulse-hot-dev 2>/dev/null; then
+ PULSE_RESTART_CMD="systemctl restart pulse-hot-dev"
+ elif command -v docker >/dev/null 2>&1 && docker ps --format '{{.Names}}' 2>/dev/null | grep -q '^pulse$'; then
+ PULSE_RESTART_CMD="docker restart pulse"
+ fi
+
+ if [[ -n "$PULSE_RESTART_CMD" ]]; then
+ if [[ "$RESTART_PULSE" == true ]]; then
+ echo ""
+ print_info "Restarting Pulse to enable temperature monitoring..."
+ if eval "$PULSE_RESTART_CMD"; then
+ sleep 3
+ print_success "Pulse restarted successfully - temperature monitoring is now active"
+ else
+ print_warn "Failed to restart Pulse automatically. Please restart manually:"
+ echo " $PULSE_RESTART_CMD"
+ fi
+ echo ""
+ else
+ echo ""
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo " Pulse Restart Required"
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo ""
+ print_info "${YELLOW}IMPORTANT:${NC} Restart Pulse to enable temperature monitoring:"
+ echo " sudo $PULSE_RESTART_CMD"
+ echo ""
+ print_info "Or add --restart-pulse flag to restart automatically:"
+ echo " curl ... | bash -s -- ... --restart-pulse"
+ echo ""
+ fi
+ fi
+
print_info "To check proxy status:"
print_info " systemctl status pulse-sensor-proxy"