#安装4.0.3最新版
pip install supervisor -i http://pypi.douban.com/simple
#/etc/init.d/supervisor文件写入开机自启动脚本
#! /bin/sh # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg <miquels@cistron.nl>. # Modified for Debian # by Ian Murdock <imurdock@gnu.ai.mit.edu>. # Further changes by Javier Fernandez-Sanguino <jfs@debian.org> # # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl # ### BEGIN INIT INFO # Provides: supervisor # Required-Start: $remote_fs $network $named # Required-Stop: $remote_fs $network $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop supervisor # Description: Start/stop supervisor daemon and its configured # subprocesses. ### END INIT INFO . /lib/lsb/init-functions PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/bin/supervisord NAME=supervisord DESC=supervisor test -x $DAEMON || exit 0 LOGDIR=/var/log/supervisor PIDFILE=/var/run/$NAME.pid DODTIME=5 # Time to wait for the server to die, in seconds # If this value is set too low you might not # let some servers to die gracefully and # 'restart' will not work # Include supervisor defaults if available if [ -f /etc/default/supervisor ] ; then . /etc/default/supervisor fi DAEMON_OPTS="-c /etc/supervisor/supervisord.conf $DAEMON_OPTS" set -e running_pid() { # Check if a given process pid's cmdline matches a given name pid=$1 name=$2 [ -z "$pid" ] && return 1 [ ! -d /proc/$pid ] && return 1 (cat /proc/$pid/cmdline | tr "