debian/0000755000000000000000000000000012175446115007174 5ustar debian/README.Debian0000644000000000000000000000150112175431172011227 0ustar supervisor for Debian --------------------- The Debian package for supervisor installs a standardised config file in /etc/supervisor/supervisord.conf. If the only thing you want to do is add configuration for programs and groups, you should create config files in /etc/supervisor/conf.d/*.conf, these will be read by the default config. There is an init.d script that will start a single instance of supervisord as root. If you intend to use supervisor only as another user, you may want to disable the init.d startup. -- Anders Hammarquist Wed, 16 Jul 2008 10:36:09 +0200 Place custom configuration files for supervisor in /etc/supervisor/conf.d/ They will be read after the main configuration file in /etc/supervisor/supervisord.conf ------------------------------------------------------------------------- debian/rules0000755000000000000000000000127612175431172010257 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_install: python setup.py install --root=debian/supervisor --install-layout=deb --no-compile override_dh_auto_build: override_dh_install: for i in `find debian -type f`; do \ sed '1s,#!.*[pP][yY][Tt][hH][oO][nN][^ ]*\(.*\),#! /usr/bin/python\1,' \ $$i > $$i.temp; \ if cmp --quiet $$i $$i.temp; then \ rm -f $$i.temp; \ else \ mv -f $$i.temp $$i; \ chmod 755 $$i; \ echo "fixed interpreter: $$i"; \ fi; \ done install -d debian/tmp/etc/supervisor/conf.d install -m 644 debian/supervisord.conf debian/tmp/etc/supervisor/supervisord.conf find debian/ -name 'LICENSE.txt' -delete dh_install --fail-missing debian/compat0000644000000000000000000000000212173527762010400 0ustar 9 debian/supervisor.default0000644000000000000000000000036412173527762012774 0ustar # Defaults for supervisor initscript # sourced by /etc/init.d/supervisor # installed at /etc/default/supervisor by the maintainer scripts # # This is a POSIX shell fragment # # Additional options that are passed to the Daemon. DAEMON_OPTS="" debian/supervisor.dirs0000644000000000000000000000002412173527762012302 0ustar var/log/supervisor debian/copyright0000644000000000000000000002005412173527762011136 0ustar Downloaded from Upstream Author: Chris McDonough (chrism@plope.com) "Agendaless Consulting":http://www.agendaless.com Mike Naberezny (mike@maintainable.com) "Maintainable Software":http://www.maintainable.com Copyright: Copyright (c) 2007 Agendaless Consulting and Contributors. License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. http_client.py code is based on code by Daniel Krech, which was released under this license: LICENSE AGREEMENT FOR RDFLIB 0.9.0 THROUGH 2.3.1 ------------------------------------------------ Copyright (c) 2002-2005, Daniel Krech, http://eikeon.com/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Daniel Krech nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Part of the testing framework in this distribution is released under the Zope Public License (as marked in its file header): Zope Public License (ZPL) Version 2.1 ------------------------------------- A copyright notice accompanies this license document that identifies the copyright holders. This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Supervisor uses a patched version of medusa which has the following license: Medusa was once distributed under a 'free for non-commercial use' license, but in May of 2000 Sam Rushing changed the license to be identical to the standard Python license at the time. The standard Python license has always applied to the core components of Medusa, this change just frees up the rest of the system, including the http server, ftp server, utilities, etc. Medusa is therefore under the following license: ============================== Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Sam Rushing not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ============================== Sam would like to take this opportunity to thank all of the folks who supported Medusa over the years by purchasing commercial licenses. The Debian packaging is (C) 2009, Anders Hammarquist and is licensed under the GPL, version 2 or later, see `/usr/share/common-licenses/GPL-2'. debian/watch0000644000000000000000000000016612173527762010236 0ustar version=3 https://pypi.python.org/simple/supervisor/ ../../packages/source/s/supervisor/supervisor-(.*).tar.gz#md5=.* debian/patches/0000755000000000000000000000000012175425016010620 5ustar debian/patches/series0000644000000000000000000000021512173527762012044 0ustar 0001-delete-medusa-debian-and-fix-perm-of-medusa.patch 0002-fix-raise-str.patch 0003-add-etc-supervisor-supervisord.conf-to-searchpath.patch debian/patches/0002-fix-raise-str.patch0000644000000000000000000000120012173527762014717 0ustar From: Qijiang Fan Date: Fri, 19 Jul 2013 11:38:58 +0800 Subject: fix raise str --- supervisor/medusa/xmlrpc_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/medusa/xmlrpc_handler.py b/supervisor/medusa/xmlrpc_handler.py index 18fa806..24c7751 100644 --- a/supervisor/medusa/xmlrpc_handler.py +++ b/supervisor/medusa/xmlrpc_handler.py @@ -56,7 +56,7 @@ class xmlrpc_handler: def call (self, method, params): # override this method to implement RPC methods - raise "NotYetImplemented" + raise Exception("NotYetImplemented") class collector: debian/patches/0003-add-etc-supervisor-supervisord.conf-to-searchpath.patch0000644000000000000000000000357212173527762024030 0ustar From: Qijiang Fan Date: Fri, 19 Jul 2013 11:43:06 +0800 Subject: add /etc/supervisor/supervisord.conf to searchpath --- supervisor/options.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/supervisor/options.py b/supervisor/options.py index 3ccab60..ed97ba3 100644 --- a/supervisor/options.py +++ b/supervisor/options.py @@ -101,6 +101,7 @@ class Options: searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'), os.path.join(here, 'supervisord.conf'), 'supervisord.conf', 'etc/supervisord.conf', + '/etc/supervisor/supervisord.conf', '/etc/supervisord.conf'] self.searchpaths = searchpaths @@ -305,7 +306,7 @@ class Options: def process_config(self, do_usage=True): """Process configuration data structure. - + This includes reading config file if necessary, setting defaults etc. """ if self.configfile: @@ -822,7 +823,7 @@ class ServerOptions(Options): raise ValueError( '%(process_num) must be present within process_name when ' 'numprocs > 1') - + if stopasgroup and not killasgroup: raise ValueError("Cannot set stopasgroup=true and killasgroup=false") @@ -1207,7 +1208,7 @@ class ServerOptions(Options): # always put our primary gid first in this list, otherwise we can # lose group info since sometimes the first group in the setgroups - # list gets overwritten on the subsequent setgid call (at least on + # list gets overwritten on the subsequent setgid call (at least on # freebsd 9 with python 2.7 - this will be safe though for all unix # /python version combos) groups.insert(0, gid) debian/patches/0001-delete-medusa-debian-and-fix-perm-of-medusa.patch0000644000000000000000000001715712173527762022344 0ustar From: Qijiang Fan Date: Fri, 19 Jul 2013 11:37:00 +0800 Subject: delete medusa/debian, and fix perm of medusa/* --- supervisor/medusa/debian/changelog | 12 ------ supervisor/medusa/debian/control | 14 ------- supervisor/medusa/debian/copyright | 24 ------------ supervisor/medusa/debian/postinst | 49 ------------------------ supervisor/medusa/debian/prerm | 26 ------------- supervisor/medusa/debian/rules | 49 ------------------------ supervisor/medusa/docs/composing_producers.gif | Bin 2707 -> 2707 bytes supervisor/medusa/docs/data_flow.gif | Bin 4091 -> 4091 bytes supervisor/medusa/docs/producers.gif | Bin 5814 -> 5814 bytes 9 files changed, 174 deletions(-) delete mode 100644 supervisor/medusa/debian/changelog delete mode 100644 supervisor/medusa/debian/control delete mode 100644 supervisor/medusa/debian/copyright delete mode 100755 supervisor/medusa/debian/postinst delete mode 100644 supervisor/medusa/debian/prerm delete mode 100755 supervisor/medusa/debian/rules mode change 100755 => 100644 supervisor/medusa/docs/composing_producers.gif mode change 100755 => 100644 supervisor/medusa/docs/data_flow.gif mode change 100755 => 100644 supervisor/medusa/docs/producers.gif mode change 100755 => 100644 supervisor/medusa/test/asyn_http_bench.py diff --git a/supervisor/medusa/debian/changelog b/supervisor/medusa/debian/changelog deleted file mode 100644 index b8ad356..0000000 --- a/supervisor/medusa/debian/changelog +++ /dev/null @@ -1,12 +0,0 @@ -python2.3-medusa (0.5.4-2) unstable; urgency=low - - * Switch to Python 2.3. - - -- A.M. Kuchling Thu, 9 Oct 2003 08:22:00 -0400 - -python2.2-medusa (0.5.4-1) unstable; urgency=low - - * Initial Release. - - -- A.M. Kuchling Fri, 22 Aug 2003 08:54:11 -0400 - diff --git a/supervisor/medusa/debian/control b/supervisor/medusa/debian/control deleted file mode 100644 index 096a00f..0000000 --- a/supervisor/medusa/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: python2.3-medusa -Priority: optional -Maintainer: A.M. Kuchling -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.8 -Section: net - -Package: python2.3-medusa -Section: net -Architecture: all -Depends: python2.3 -Description: Medusa is a 'server platform' -- it provides a framework for - implementing asynchronous socket-based servers (TCP/IP and on Unix, - Unix domain, sockets). diff --git a/supervisor/medusa/debian/copyright b/supervisor/medusa/debian/copyright deleted file mode 100644 index 841cd2e..0000000 --- a/supervisor/medusa/debian/copyright +++ /dev/null @@ -1,24 +0,0 @@ -This package was debianized by A.M. Kuchling on -Fri, 22 Aug 2003 08:54:11 -0400. - -It was downloaded from www.amk.ca/python/code/medusa.html - -Upstream Author: A.M. Kuchling - -Copyright: - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sam Rushing not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/supervisor/medusa/debian/postinst b/supervisor/medusa/debian/postinst deleted file mode 100755 index 8d42bac..0000000 --- a/supervisor/medusa/debian/postinst +++ /dev/null @@ -1,49 +0,0 @@ -#! /bin/sh -# postinst script for medusa -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -PACKAGE=python2.3-medusa -VERSION=2.3 -LIB="/usr/lib/python$VERSION" -DIRLIST="$LIB/site-packages/medusa" - -case "$1" in - configure|abort-upgrade|abort-remove|abort-deconfigure) - for i in $DIRLIST ; do - /usr/bin/python$VERSION -O $LIB/compileall.py -q $i - /usr/bin/python$VERSION $LIB/compileall.py -q $i - done - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - - - -exit 0 - - diff --git a/supervisor/medusa/debian/prerm b/supervisor/medusa/debian/prerm deleted file mode 100644 index bd6819e..0000000 --- a/supervisor/medusa/debian/prerm +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh -# prerm script for medusa - -set -e - -PACKAGE=python2.3-medusa -VERSION=2.3 -LIB="/usr/lib/python$VERSION" -DIRLIST="$LIB/site-packages/medusa" - -case "$1" in - remove|upgrade|failed-upgrade) - for i in $DIRLIST ; do - find $i -name '*.py[co]' -exec rm \{\} \; - done - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - - - -exit 0 diff --git a/supervisor/medusa/debian/rules b/supervisor/medusa/debian/rules deleted file mode 100755 index 7f73054..0000000 --- a/supervisor/medusa/debian/rules +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatibility version to use. -export DH_COMPAT=4 - - - -build: build-stamp - /usr/bin/python setup.py build -build-stamp: - touch build-stamp - -configure: - # Do nothing - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - -rm -rf build - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - /usr/bin/python setup.py install --no-compile --prefix=$(CURDIR)/debian/python2.3-medusa/usr - -# Build architecture-independent files here. -binary-indep: install - dh_testdir - dh_testroot - - dh_installdocs - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb -# We have nothing to do by default. - -binary: binary-indep -.PHONY: build clean binary-indep binary install diff --git a/supervisor/medusa/docs/composing_producers.gif b/supervisor/medusa/docs/composing_producers.gif old mode 100755 new mode 100644 diff --git a/supervisor/medusa/docs/data_flow.gif b/supervisor/medusa/docs/data_flow.gif old mode 100755 new mode 100644 diff --git a/supervisor/medusa/docs/producers.gif b/supervisor/medusa/docs/producers.gif old mode 100755 new mode 100644 diff --git a/supervisor/medusa/test/asyn_http_bench.py b/supervisor/medusa/test/asyn_http_bench.py old mode 100755 new mode 100644 debian/control0000644000000000000000000000167212175431434010603 0ustar Source: supervisor Section: admin Priority: extra Maintainer: Qijiang Fan Build-Depends: debhelper (>= 9), python-setuptools, python-all (>= 2.6.6~3) X-Python-Version: >= 2.4 VCS-Git: git://anonscm.debian.org/collab-maint/supervisor.git VCS-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/supervisor.git;a=summary Standards-Version: 3.9.4 Homepage: http://supervisord.org/ Package: supervisor Architecture: all Depends: python, python-meld3, python-pkg-resources (>= 0.6c7), ${misc:Depends} Description: A system for controlling process state Supervisor is a system for controlling and maintaining process state, similar to what init does, but not intended as an init replacement. . It will manage individual processes or groups of processes that need to be started and stopped in order, and it is possible to control individual process state via an rpc mechanism, thus allowing ordinary users to restart processes. debian/supervisor.docs0000644000000000000000000000002412173527762012271 0ustar README.rst TODO.txt debian/source/0000755000000000000000000000000012175425111010465 5ustar debian/source/format0000644000000000000000000000001412173527762011710 0ustar 3.0 (quilt) debian/supervisor.examples0000644000000000000000000000035112173527762013162 0ustar supervisor/scripts/loop_eventgen.py supervisor/scripts/loop_listener.py supervisor/scripts/sample_commevent.py supervisor/scripts/sample_eventlistener.py supervisor/scripts/sample_exiting_eventlistener.py supervisor/skel/sample.conf debian/changelog0000644000000000000000000000240612175431172011045 0ustar supervisor (3.0b2-1) unstable; urgency=low * New Maintainer (Closes: #717060) * New upstream release (Closes: #697883, #608694) * Fix restart function of init script (Closes: #609457) * Fix typo in package description (Closes: #697622) * Fix "string exception" (Closes: #585359) -- Qijiang Fan Thu, 18 Jul 2013 10:49:09 +0800 supervisor (3.0a8-1.1) unstable; urgency=low * Non-maintainer upload. * Rebuild to add Python 2.7 support -- Piotr Ożarowski Sun, 08 May 2011 16:45:52 +0200 supervisor (3.0a8-1) unstable; urgency=low * New upstream release -- Anders Hammarquist Tue, 26 Jan 2010 13:17:32 +0100 supervisor (3.0a7-2.1) unstable; urgency=low * Non-maintainer upload. * Fix "manipulates site-packages/ directly, failing with Python 2.6" Applied and uploaded Kumar's patch. (Closes: #547858) -- Bastian Venthur Sat, 07 Nov 2009 13:06:00 +0100 supervisor (3.0a7-2) unstable; urgency=low * Fix build-depdends (Closes: #545624) -- Anders Hammarquist Wed, 09 Sep 2009 23:12:43 +0200 supervisor (3.0a7-1) unstable; urgency=low * Initial release (Closes: #491665). -- Anders Hammarquist Thu, 30 Jul 2009 11:29:24 +0200 debian/supervisor.init0000644000000000000000000001061312175446115012303 0ustar #! /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 . # Modified for Debian # by Ian Murdock . # Further changes by Javier Fernandez-Sanguino # # 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/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 "\000" "\n"|grep -q $name) || return 1 return 0 } running() { # Check if the process is running looking at /proc # (works for all users) # No pidfile, probably no daemon present [ ! -f "$PIDFILE" ] && return 1 # Obtain the pid and check it against the binary name pid=`cat $PIDFILE` running_pid $pid $DAEMON || return 1 return 0 } force_stop() { # Forcefully kill the process [ ! -f "$PIDFILE" ] && return if running ; then kill -15 $pid # Is it really dead? [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then kill -9 $pid [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then echo "Cannot kill $LABEL (pid=$pid)!" exit 1 fi fi fi rm -f $PIDFILE return 0 } case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile $PIDFILE \ --startas $DAEMON -- $DAEMON_OPTS test -f $PIDFILE || sleep 1 if running ; then echo "$NAME." else echo " ERROR." fi ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE echo "$NAME." ;; force-stop) echo -n "Forcefully stopping $DESC: " force_stop if ! running ; then echo "$NAME." else echo " ERROR." fi ;; #reload) # # If the daemon can reload its config files on the fly # for example by sending it SIGHUP, do it here. # # If the daemon responds to changes in its config file # directly anyway, make this a do-nothing entry. # # echo "Reloading $DESC configuration files." # start-stop-daemon --stop --signal 1 --quiet --pidfile \ # /var/run/$NAME.pid --exec $DAEMON #;; force-reload) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart" except that it does nothing if the # daemon isn't already running. # check wether $DAEMON is running. If so, restart start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \ --startas $DAEMON \ && $0 restart \ || exit 0 ;; restart) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE [ -n "$DODTIME" ] && sleep $DODTIME start-stop-daemon --start --quiet --pidfile $PIDFILE \ --startas $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; status) echo -n "$LABEL is " if running ; then echo "running" else echo " not running." exit 1 fi ;; *) N=/etc/init.d/$NAME # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 exit 1 ;; esac exit 0 debian/supervisord.conf0000644000000000000000000000223212173527762012435 0ustar ; supervisor config file [unix_http_server] file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; sockef file mode (default 0700) [supervisord] logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be ; added by defining them in separate rpcinterface: sections [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files *cannot* ; include files themselves. [include] files = /etc/supervisor/conf.d/*.conf debian/supervisor.install0000644000000000000000000000000512173527762013006 0ustar etc/