pkgsrc/net/pygopherd/files/pygopherd.sh
recht 84ed1c5f61 Initial import of pygopherd 2.0.3
via pkgsrc-wip
The patches are adapated from FreeBSD's pygopherd "port".

This is an all-new, modern Gopher server.  It can serve documents
with Gopher+, standard Gopher (RFC1436), and HTTP -- all on the same
port.  Pygopherd features a modular extension system as well as
loadable scripts and much more.  It contains full support for
UMN gopherd systems -- including .Links, .names, .cap, searches, etc.
Pygopherd also supports Bucktooth features such as gophermap files
and executables.  In addition to all this, there are Pygopherd's own
extra features.  All features are fully customizable and can be enabled
or disabled by editing etc/pygopherd/pygopherd.conf.
2003-09-30 17:27:28 +00:00

41 lines
906 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: pygopherd.sh,v 1.1.1.1 2003/09/30 17:27:30 recht Exp $
#
# PROVIDE: pygopherd
# REQUIRE: DAEMON
#
# To start spread at startup, copy this script to /etc/rc.d and set
# spread=YES in /etc/rc.conf.
#
# Addtionally you may set spread_log to a file where to log stuff.
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
rcd_dir=`@DIRNAME@ $0`
name="pygopherd"
rcvar=$name
command="@PREFIX@/bin/${name}"
command_interpreter="@PYTHONBIN@"
pidfile="/var/run/${name}.pid"
conf_file="@PKG_SYSCONFDIR@/${name}.conf"
mime_file="@PKG_SYSCONFDIR@/mime.types"
required_files="${conf_file} ${mime_file}"
start_precmd="${name}_precmd"
pygopherd_precmd()
{
if [ ! -d @RUNTIMEDIR@ ]
then
@MKDIR@ @RUNTIMEDIR@
@CHMOD@ 0750 @RUNTIMEDIR@
@CHOWN@ @PKG_USERS@ @RUNTIMEDIR@
fi
}
load_rc_config $name
run_rc_command "$1"