supervisord.conf

1.安装

pip install supervisor

2.全局配置


cat <<EOF>> /etc/supervisord.conf
[supervisord]
logfile = /var/log/supervisor/supervisord.log
logfile_maxbytes = 100MB
logfile_backups = 10
loglevel = info
pidfile = /var/run/supervisord.pid
nodaemon = false
minfds = 1024
minprocs = 200
umask = 022
user = root
identifier = supervisor
nocleanup = true
childlogdir = /var/log/supervisor
strip_ansi = false

[supervisorctl]
serverurl = http://127.0.0.1:9001
username =
password =
prompt = supervisor

[inet_http_server]
port = 127.0.0.1:9001
username =
password =

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[include]
files = /etc/supervisord.d/*.conf
EOF

3.服务配置

[program:openvpn]
command= /etc/openvpn-server/sbin/openvpn --config /etc/openvpn-server/server.conf
directory= /etc/openvpn-server
stopwaitsecs=10
stopasgroup=true
killasgroup=true
autostart = true
autorestart=true
redirect_stderr=true
stderr_logfile = /var/log/supervisor/openvpn-access.log
stdout_logfile = /var/log/supervisor/openvpn-stdout.log

results matching ""

    No results matching ""