linux - Ubuntu - 如何自动重新启动崩溃或卡住的进程?

标签 linux ubuntu service

我是一个 Linux (Ubuntu) 新手,对命令行和编写脚本不太了解。我想让一个进程在卡住或崩溃时自动重新启动。

对于 Windows,有多种可用程序可让您将任何应用程序转换为 Windows 服务。我怎样才能在 Ubuntu 中做到这一点?有没有可用的工具,最好是带有 GUI 的工具?或者也许有任何白痴教程?

最佳答案

您应该使用 - 从命令行(终端)安装 daemontools

apt-get -y 安装守护进程工具

详细说明见这里:http://cr.yp.to/daemontools/install.html

并使用“监督”命令

有关说明,请参见此处:http://cr.yp.to/daemontools/supervise.html

关于linux - Ubuntu - 如何自动重新启动崩溃或卡住的进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9351026/

相关文章:

Linux如何将时间格式转换为纪元时间?

postgresql - 为什么 PostgreSQL 找不到我新创建的数据库

git - 在 webroot 目录而不是 ~/.ssh 中克隆时权限被拒绝(公钥)

linux - Prometheus 2.0 centos 服务无法启动,因为 "Opening storage failed", "permission denied"

python - 将数据从 Raspberry pi 移动到 synology diskstation 以呈现在网页中

service - Soap FaultString 显示详细的错误消息而不是简短的错误

linux - 通过 Yaourt Manjaro 错误安装 Gitkraken

linux - 如何将 .gz 文件的内容转换为小写

linux - 跟踪特定的 IP 和端口

linux - 如何取消受密码保护的 PDF 文件的打印保护?