Commit Graph
1 Commits
Author SHA1 Message Date
agessaman 317b1a2a56 fix(core): refuse to start a second instance on the same database
Two bots on one radio evict each other from single-client companion servers such as openhop, which closes the older connection when a new one arrives. Each instance then reconnects and evicts the other in an endless loop.

Startup now takes an advisory lock on <db_path>.lock beside the bot database and exits 1 with the holder's PID when it is already held. The OS releases the lock on any exit, so a killed bot leaves nothing stale. The lock is taken before a pending restore is applied, so a second launch cannot replace the database under a running bot. A lock file that cannot be created is only a warning.
2026-11-13 05:58:47 -08:00