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(dev): add optional file backup watcher to hot-dev

rcourtmanc743bd2c3086
diff --git a/.gitignore b/.gitignore
index 2f9f0e6a7e..a267fb8634 100644
--- a/.gitignore
+++ b/.gitignore
@@ -196,3 +196,11 @@ measure_sessions.sh
# SQLite temp files
*.db-shm
*.db-wal
+
+# Auto-backup logs
+
+# Local backup scripts (not committed)
+scripts/watch-backup.sh
+scripts/auto-backup.sh
+scripts/safe-checkout.sh
+BACKUP_SYSTEM.md
diff --git a/scripts/hot-dev.sh b/scripts/hot-dev.sh
index a9513396a2..8e6ecbe220 100755
--- a/scripts/hot-dev.sh
+++ b/scripts/hot-dev.sh
@@ -5,6 +5,7 @@
# - Go backend with auto-rebuild on file changes (via inotifywait)
# - Vite frontend dev server with HMR
# - Auto-detection of pulse-pro module for Pro features
+# - File backup watcher (if scripts/watch-backup.sh exists)
#
# Environment Variables:
# HOT_DEV_USE_PROD_DATA=true Use /etc/pulse for data (sessions, config, etc.)
@@ -575,14 +576,30 @@ cleanup() {
kill "${VITE_PID}" 2>/dev/null || true
fi
+ # Kill file backup watcher
+ if [[ -n ${BACKUP_WATCHER_PID:-} ]] && kill -0 "${BACKUP_WATCHER_PID}" 2>/dev/null; then
+ kill "${BACKUP_WATCHER_PID}" 2>/dev/null || true
+ fi
+
# Fallback cleanup
pkill -f "inotifywait.*pulse" 2>/dev/null || true
pkill -f "fswatch.*pulse" 2>/dev/null || true
-
+ pkill -f "watch-backup.sh" 2>/dev/null || true
+
log_info "Hot-dev stopped."
}
trap cleanup INT TERM EXIT
+# --- Start File Backup Watcher (optional) ---
+
+BACKUP_SCRIPT="${ROOT_DIR}/scripts/watch-backup.sh"
+if [[ -x "${BACKUP_SCRIPT}" ]]; then
+ log_info "Starting file backup watcher..."
+ "${BACKUP_SCRIPT}" > /tmp/pulse-watch-backup.log 2>&1 &
+ BACKUP_WATCHER_PID=$!
+ log_info "File backups: ~/.pulse-backups (PID: ${BACKUP_WATCHER_PID})"
+fi
+
# --- Start Frontend ---
log_info "Starting frontend with hot-reload on port ${FRONTEND_DEV_PORT}..."