mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- On startup, /etc/rc procedure stops when thttpd is installed.
* ${PREFIX}/etc/rc.d/thttpd.sh does not return. * FIX: invoke thttpd_wrapper as a background process. - On shutdown, Message "No processes matching ``thttpd_wrapper''" is shown. * thttpd_wrapper is actually a shell script, not an executable. * FIX: Record the pid of thttpd_wrapper to /var/run. * FIX: Use pid-file when killing the wrapper. Submitted by: Makoto MATSUSHITA <matusita@jp.freebsd.org> Reviewed by: Anders Nordby <anders@fix.no> (maintainer)
This commit is contained in:
parent
ae5a14a7ce
commit
143b2d53ee
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=30594
2 changed files with 3 additions and 2 deletions
|
@ -41,6 +41,7 @@ do-install:
|
|||
@if [ ! -f ${PREFIX}/sbin/thttpd_wrapper ]; then \
|
||||
${ECHO} "Installing ${PREFIX}/sbin/thttpd_wrapper file."; \
|
||||
${ECHO} "#!/bin/sh" > ${PREFIX}/sbin/thttpd_wrapper; \
|
||||
${ECHO} "${ECHO} \$$\$$ > /var/run/thttpd_wrapper.pid" >> ${PREFIX}/sbin/thttpd_wrapper; \
|
||||
${ECHO} "while true ; do" >> ${PREFIX}/sbin/thttpd_wrapper; \
|
||||
${ECHO} " ${PREFIX}/sbin/thttpd -D -C ${PREFIX}/etc/thttpd.conf" >> ${PREFIX}/sbin/thttpd_wrapper; \
|
||||
${ECHO} " sleep 10" >> ${PREFIX}/sbin/thttpd_wrapper; \
|
||||
|
|
|
@ -7,10 +7,10 @@ fi
|
|||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/thttpd_wrapper ] && ${PREFIX}/sbin/thttpd_wrapper && echo -n ' thttpd'
|
||||
[ -x ${PREFIX}/sbin/thttpd_wrapper ] && ${PREFIX}/sbin/thttpd_wrapper & && echo -n ' thttpd'
|
||||
;;
|
||||
stop)
|
||||
killall thttpd_wrapper && killall thttpd && echo -n ' thttpd'
|
||||
kill `cat /var/run/thttpd_wrapper.pid` && killall thttpd && echo -n ' thttpd'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
|
|
Loading…
Add table
Reference in a new issue