1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| # 用于 supervisor 管理进程 function output() { echo \ "[program:${app_name}] ; directory=${app_dir} ; command=${app_dir}/${app_name} ; autostart=true ; autorestart=true ; startsecs=10 ; startretries=3 ; user=root ; redirect_stderr=true ; stdout_logfile=${log_dir}/${app_name}_stdout.log ; stdout_logfile_maxbytes=20MB ; stdout_logfile_backups=20 ; " >${app_name}.ini }
# 启动命令 supervisorctl start ${app_name} ;
# 更新命令 supervisorctl update ;
# 重启命令 supervisorctl restart ${app_name} ;
# 查看状态 supervisorctl status ${app_name} ;
|