blob: 19b63e31dff34c8211d6810ae00a293a0bd47de8 [file] [log] [blame]
tedboded96622010-02-02 14:49:04 -08001#!/sbin/runscript
2# Copyright 1999-2008 Gentoo Technologies, Inc.
3# Distributed under the terms of the GNU General Public Licence v2
4# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.2 2008/06/30 15:10:28 hawking Exp $
5
6depend() {
7 need net
8}
9
10start() {
11 if [ -z $PYDOC_PORT ] ; then
12 eerror "Port not set"
13 return 1
14 fi
15 ebegin "Starting pydoc server on port $PYDOC_PORT"
16 start-stop-daemon --start --background --make-pidfile \
17 --pidfile /var/run/pydoc.pid \
18 --startas /usr/bin/pydoc -- -p $PYDOC_PORT
19 eend $?
20}
21
22stop() {
23 ebegin "Stopping pydoc server"
24 start-stop-daemon --stop --quiet --pidfile /var/run/pydoc.pid
25 eend $?
26}