feat(daemon): warn when rig wisp config missing

Logs a warning when checking rig operational state if the wisp
config file doesn't exist. This helps diagnose cases where a
parked rig unexpectedly restarts because its parked state was lost.
This commit is contained in:
gus
2026-01-07 01:34:32 -08:00
committed by Steve Yegge
parent e2a211e295
commit 06d40925d1

View File

@@ -494,6 +494,11 @@ func (d *Daemon) getKnownRigs() []string {
func (d *Daemon) isRigOperational(rigName string) (bool, string) {
cfg := wisp.NewConfig(d.config.TownRoot, rigName)
// Warn if wisp config is missing - parked/docked state may have been lost
if _, err := os.Stat(cfg.ConfigPath()); os.IsNotExist(err) {
d.logger.Printf("Warning: no wisp config for %s - parked state may have been lost", rigName)
}
// Check rig status - parked and docked rigs should not have agents auto-started
status := cfg.GetString("status")
switch status {