diff options
Diffstat (limited to 'www/thttpd')
-rw-r--r-- | www/thttpd/files/patch-sum | 4 | ||||
-rw-r--r-- | www/thttpd/files/thttpd.sh | 25 | ||||
-rw-r--r-- | www/thttpd/patches/patch-ac | 6 |
3 files changed, 22 insertions, 13 deletions
diff --git a/www/thttpd/files/patch-sum b/www/thttpd/files/patch-sum index df66e7f57cc..8430e35dd01 100644 --- a/www/thttpd/files/patch-sum +++ b/www/thttpd/files/patch-sum @@ -1,6 +1,6 @@ -$NetBSD: patch-sum,v 1.9 2000/12/17 22:21:44 jlam Exp $ +$NetBSD: patch-sum,v 1.10 2001/01/14 06:14:13 jlam Exp $ MD5 (patch-aa) = 0849eeaf8e38c6a920cc6f7cdd4f0132 MD5 (patch-ab) = 947db3fea2e41d03e5fe2324d5a75727 -MD5 (patch-ac) = 3af8b6c6b56c05bae0d3d1b18df6c7ce +MD5 (patch-ac) = c8d5612d1f37a5497a3b9b5d67fdcf95 MD5 (patch-ad) = 6125ef20626049c8ba0560243d4a2695 diff --git a/www/thttpd/files/thttpd.sh b/www/thttpd/files/thttpd.sh index d941b96cdb6..5b8ef544608 100644 --- a/www/thttpd/files/thttpd.sh +++ b/www/thttpd/files/thttpd.sh @@ -1,45 +1,54 @@ #!/bin/sh # -# $NetBSD: thttpd.sh,v 1.3 2000/09/20 05:14:13 jlam Exp $ +# $NetBSD: thttpd.sh,v 1.4 2001/01/14 06:14:13 jlam Exp $ # # PROVIDE: thttpd # REQUIRE: DAEMON name="thttpd" command=@PREFIX@/sbin/${name} -pidfile="/var/run/${name}.pid" + +pid=`ps -ax | awk '{print $1,$5}' | grep ${name} | awk '{print $1}'` cmd=${1:-start} case ${cmd} in start) - if [ -x ${command} -a -f /etc/${name}.conf ] + if [ "$pid" = "" -a -x ${command} -a -f /etc/${name}.conf ] then echo "Starting ${name}." - ${command} -i ${pidfile} -C /etc/${name}.conf + ${command} -C /etc/${name}.conf fi ;; + stop) - if [ -f ${pidfile} ]; then - pid=`head -1 ${pidfile}` + if [ "$pid" != "" ] + then echo "Stopping ${name}." kill -TERM ${pid} else echo "${name} not running?" fi ;; + restart) ( $0 stop ) sleep 1 $0 start ;; + status) - if [ -f ${pidfile} ]; then - pid=`head -1 ${pidfile}` + if [ "$pid" != "" ] + then echo "${name} is running as pid ${pid}." else echo "${name} is not running." fi ;; + +*) + echo 1>&2 "Usage: ${name} [restart|start|stop|status]" + exit 1 + ;; esac exit 0 diff --git a/www/thttpd/patches/patch-ac b/www/thttpd/patches/patch-ac index 47139e1f23f..0bb0df4849e 100644 --- a/www/thttpd/patches/patch-ac +++ b/www/thttpd/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.4 2000/12/17 22:21:45 jlam Exp $ +$NetBSD: patch-ac,v 1.5 2001/01/14 06:14:14 jlam Exp $ --- cgi-src/Makefile.in.orig Tue Sep 26 16:20:14 2000 +++ cgi-src/Makefile.in @@ -22,13 +22,13 @@ $NetBSD: patch-ac,v 1.4 2000/12/17 22:21:45 jlam Exp $ + $(BSD_INSTALL_MAN) redirect.8 $(MANDIR)/man8/redirect.8 rm -f $(CGIBINDIR)/ssi - cp ssi $(CGIBINDIR)/ssi -+ $(BSD_INSTALL_MAN) ssi $(CGIBINDIR)/ssi ++ $(BSD_INSTALL_PROGRAM) ssi $(CGIBINDIR)/ssi rm -f $(MANDIR)/man8/ssi.8 - cp ssi.8 $(MANDIR)/man8/ssi.8 + $(BSD_INSTALL_MAN) ssi.8 $(MANDIR)/man8/ssi.8 rm -f $(CGIBINDIR)/phf - cp phf $(CGIBINDIR)/phf -+ $(BSD_INSTALL_MAN) phf $(CGIBINDIR)/phf ++ $(BSD_INSTALL_PROGRAM) phf $(CGIBINDIR)/phf clean: rm -f $(CLEANFILES) |