【问题标题】:How to automatically restart the service when crush on CentOS?在 CentOS 上暗恋时如何自动重启服务?
【发布时间】:2021-04-12 21:53:07
【问题描述】:

我在centos上有一个docker服务,发现有时候docker服务会crush in。

我必须手动运行命令service docker start

那么如何观察服务并在服务崩溃时自动重启呢?

谢谢!

【问题讨论】:

标签: linux docker service centos


【解决方案1】:

是的!使用monit。似乎工作


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

【讨论】:

    猜你喜欢
    • 2023-04-02
    • 2016-07-28
    • 1970-01-01
    • 2018-08-23
    • 2017-06-01
    • 2019-08-23
    • 2020-07-12
    • 1970-01-01
    • 2015-02-24
    相关资源
    最近更新 更多