简体   繁体   English

暗恋CentOS时如何自动重启服务?

[英]How to automatically restart the service when crush on CentOS?

I have a docker service on centos, and I found that the docker service will crush in sometimes.我在 centos 上有一个 docker 服务,我发现 docker 服务有时会崩溃。

I have to run the command service docker start manually.我必须手动运行命令service docker start

So how to watch the service and automatically restart when the services crush?那么如何观察服务并在服务crush时自动重启呢?

Thank you!谢谢!

yes!是的! use monit .使用monit Seems work似乎工作


check process docker with pidfile /var/run/docker.pid
    start program = "/bin/systemctl start docker"
    stop program = "/bin/systemctl stop docker"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM