linux - 在 CentOS 上暗恋时如何自动重启服务?

标签 linux docker service centos

我在centos上有一个docker服务,我发现docker服务有时会卡住。
我必须运行命令 service docker start手动。
那么如何观察服务并在服务crush时自动重启呢?
谢谢!

最佳答案

是的!使用 monit .似乎工作


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

关于linux - 在 CentOS 上暗恋时如何自动重启服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65607839/

相关文章:

适用于 Windows 的 Docker 桌面 : No hypervisor is present on this system

c++ - 设备或资源从头开始和 Alpine 在容器中忙碌,但不在 ubuntu 上

java - 如何在服务中使用 FirebaseListAdapter<String>?

Android:将参数从Activity传递给Service

c++ boost asio异步编译错误

linux - Git - 如何从 checkout 自动完成中删除分支

linux - cronjob等待理解

ubuntu - 在 docker 中运行特定的 ubuntu

windows - Git 源代码控制下的 Solr 配置和设置

java - Maven 和 Jenkins : dependency error when building project