M

MALA文档

MALA文档

  • 首页
  • 关于
Home 安装 Supervisor 进程守护
文章

安装 Supervisor 进程守护

Posted 2024-08-30 Updated 2024-08- 30
By mala
4~5 min read

Debian 安装 Supervisor

在VPS执行

apt-get install supervisor -y

配置文件

Supervisor 的配置文件为 /etc/supervisor/supervisord.conf
Supervisor 所管理应用的配置文件放在 /etc/supervisor/conf.d/ 目录中,需要对每个应用进行配置。在 /etc/supervisor/conf.d/ 中创建 xxxxxx.conf,每个应用对应一个配置文件即可。

配置文件内容示例

[program:soga-ss]
command=/usr/local/soga/soga -c /etc/soga/soga-ss.conf
directory=/usr/local/soga/
user = root
stopsignal = INT
autostart = true
autorestart = true
startsecs = 1
stderr_logfile = /var/log/soga-ss.err.log

注意:如果是文档内说明需要使用Supervisor,一般会提供Supervisor的配置文件,直接上传到 /etc/supervisor/conf.d/ 目录中即可

添加开机启动 Supervisor

systemctl enable supervisor

启动 Supervisor

supervisorctl start all

常用命令

#关闭所有任务
supervisorctl shutdown
#关闭指定任务
supervisorctl stop program_name
#开启指定任务
supervisorctl start program_name
#查看所有任务状态
supervisorctl status
#加载新的配置
supervisorctl update
#重启所有任务
supervisorctl reload

注意:修改配置文件后,均需要执行 supervisorctl update 和 supervisorctl reload 命令。

License:  私有
Share

Further Reading

OLDER

Debian安装Python 3.10

NEWER

vNboard系列从reCAPTCHA迁移至Turnstile

Recently Updated

  • V2B还原过期用户数据
  • Epusdt支付插件
  • Mala-Pro主题对接Crisp
  • MALA-Pro 主题前端安装文档
  • MALA-Pro 主题API后端安装文档

Trending Tags

Halo

Contents

©2025 MALA文档. Some rights reserved.

Using the Halo theme Chirpy