HouzuoGuo/laitos

Improve supervisor by auto-restarting laitos process in case of crash

HouzuoGuo opened this issue · 1 comments

Implement the following behaviour in supervisor:

  • Upon start, fork laitos main process that runs all daemons.
  • When the main process crashes, restart the main process up to two times.
  • Should more crashes occur, shed daemons one by one in consecutive crashes, in the following order:
    • maintenance
    • dnsd
    • sockd
    • smtpd
    • httpd
    • insecurehttpd
    • telegram
    • plainsocket
  • If the last remaining daemon still crashes, then cease shedding daemons and only relaunch main process with all daemons enabled in case of further crash.

The rationale works very well for aircraft checklists, I suppose it should also work in this case.