diff options
author | uebayasi <uebayasi> | 2002-03-15 07:19:58 +0000 |
---|---|---|
committer | uebayasi <uebayasi> | 2002-03-15 07:19:58 +0000 |
commit | 0d1c807427f4ad7b3149c5e03219b692dd5a632e (patch) | |
tree | f4fa026c0d92cb01abdefecefc6066a92b2c2cb7 /textproc/ndtpd/files | |
parent | 3ec6ee309341337b489a698404624efb78568d82 (diff) | |
download | pkgsrc-0d1c807427f4ad7b3149c5e03219b692dd5a632e.tar.gz |
Initial import of NDTPD 2.1.1, a server for accessing CD-ROM books /
dictionaries with NDTP protocol.
Diffstat (limited to 'textproc/ndtpd/files')
-rw-r--r-- | textproc/ndtpd/files/ndtpd.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/textproc/ndtpd/files/ndtpd.sh b/textproc/ndtpd/files/ndtpd.sh new file mode 100644 index 00000000000..b72910eed3e --- /dev/null +++ b/textproc/ndtpd/files/ndtpd.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $NetBSD: ndtpd.sh,v 1.1.1.1 2002/03/15 07:19:58 uebayasi Exp $ +# +# PROVIDE: ndtpd +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# To start ndtpd at startup, copy this script to /etc/rc.d and set +# ndtpd=YES in /etc/rc.conf. + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="ndtpd" +rcvar=$name +prog="@PREFIX@/sbin/ndtpd" +pidfile=@NDTPD_RUNDIR@/ndtpd/ndtpd.pid + +case $1 in +start) + { @ECHO@ "Starting ${name}."; ${prog} >/dev/null 2>&1; } || { + @ECHO@ "Configuration error?" >&2 + @ECHO@ "Try @PREFIX@/sbin/ndtpdcheck" >&2 + exit 1 + } + ;; +stop) + if [ -f ${pidfile} ]; then + pid=`@HEAD@ -1 ${pidfile}` + @ECHO@ "Stopping ${name}." + kill -s TERM ${pid} + else + @ECHO@ "${name} not running?" + exit 1 + fi + ;; +*) + @ECHO@ "Usage: $0 [start|stop]" 1>&2 + exit 1 + ;; +esac + +exit 0 |