daemontools

What is daemontools?

daemontools is a collection of tools for managing UNIX services.
supervise monitors a service. It starts the service and restarts the service if it dies.
Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service.

tools list

  • supervise
    • 目录的结构是有规定的
  • svc
    service 开关
  • svscan
    用来启动服务目录下的所有子目录中的supervise(请看supervise)进程
  • svoko
    用来检查supervise是否在运行
  • svstat
    打印出被supverise监视的services运行状态

  • svscanboot

    这条指令非常重要,但是一般不需要自己手动输入执行,
    它用来启动 /service 目录下的svscan(请看svscan)命令,
    然后svscan会启动supvise(请看supvise),supvise会执行run脚本并且监视它。
    安装成功后在Linux重启的时候会自动执行svscanboot

How to install it?

use it

Reference