mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
The current state of ctrld is very "high stakes" and easy to mess up, and is unforgiving when "ctrld start" failed. That would cause the router is in broken state, unrecoverable. This commit makes these changes to improve the state: - Moving router setup process after ctrld listeners are ready, so dnsmasq won't flood requests to ctrld even though the listeners are not ready to serve requests. - On router, when ctrld stopped, restore router DNS setup. That leaves the router in good state on reboot/startup, help removing the custom DNS server for NTP synchronization on some routers. - If self-check failed, uninstall ctrld to restore router to good state, prevent confusion that ctrld process is still running even though self-check reports it did not started.