主管exec shell脚本并停止

时间:2016-07-29 04:31:42

标签: python linux ubuntu supervisord supervisor

我使用supervisor来执行一个shell脚本,而shell脚本也生成一些子进程,当我使用“supervisorctl stop sh”时,supervisor只停止sh进程,但不杀死sh子进程。

我启用了stopasgroup和killasgroup但没有工作。

主管程序配置

[program:caravel]
autostart=true
autorestart=true
killasgroup=true
stopasgroup=true

command=/root/caravel/start_caravel.sh

shell脚本

#!/bin/bash
source /root/caravel/env/bin/activate
gunicorn caravel:app

0 个答案:

没有答案