diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2008-03-01 13:38:52 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2008-03-01 13:38:52 +0000 |
commit | 3eefbfbfff1b914e87a6bdcbcb9b55394f65fb80 (patch) | |
tree | 1b344c62b8d44f3a5683a1d11f047a53d7888e59 /dev-lang/python/files/pydoc.init | |
parent | fix build on g/fbsd (diff) | |
download | historical-3eefbfbfff1b914e87a6bdcbcb9b55394f65fb80.tar.gz historical-3eefbfbfff1b914e87a6bdcbcb9b55394f65fb80.tar.bz2 historical-3eefbfbfff1b914e87a6bdcbcb9b55394f65fb80.zip |
Added init.d/conf.d scripts for the integrated pydoc webserver (bug #59903, thanks to compnerd).
Package-Manager: portage-2.1.4.4
RepoMan-Options: --force
Diffstat (limited to 'dev-lang/python/files/pydoc.init')
-rwxr-xr-x | dev-lang/python/files/pydoc.init | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init new file mode 100755 index 000000000000..8e436db3eec2 --- /dev/null +++ b/dev-lang/python/files/pydoc.init @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public Licence v2 +# $Header: + +depend() { + need net +} + +start() { + if [ -z $PYDOC_PORT ] ; then + eerror "Port not set" + 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 $? +} |