#!/sbin/runscript # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public Licence v2 # $Header: # source our config source /etc/conf.d/pydoc depend() { need net domainname } start() { if [ $PYDOC_PORT = 0 ] ; then eerror "Invalid port value" return 1 fi ebegin "Starting pydoc server on port $PYDOC_PORT" start-stop-daemon --start --background --make-pidfile \ --pidfile /var/run/pydoc.pid \ --startas /usr/bin/pydoc -- -p $PYDOC_PORT eend $? } stop() { ebegin "Stopping pydoc server" start-stop-daemon --stop --quiet --pidfile /var/run/pydoc.pid eend $? }