diff options
-rw-r--r-- | www/fcgiwrap/Makefile | 2 | ||||
-rw-r--r-- | www/fcgiwrap/files/fcgiwrap.in | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/www/fcgiwrap/Makefile b/www/fcgiwrap/Makefile index ab131661e605..54f20c2f53f4 100644 --- a/www/fcgiwrap/Makefile +++ b/www/fcgiwrap/Makefile @@ -2,7 +2,7 @@ PORTNAME= fcgiwrap PORTVERSION= 1.1.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www MAINTAINER= ports@FreeBSD.org diff --git a/www/fcgiwrap/files/fcgiwrap.in b/www/fcgiwrap/files/fcgiwrap.in index 4de8902c9850..daa165490606 100644 --- a/www/fcgiwrap/files/fcgiwrap.in +++ b/www/fcgiwrap/files/fcgiwrap.in @@ -87,7 +87,18 @@ fcgiwrap_postcmd() { fi } -fcgiwrap_cleansocket() { +fcgiwrap_stop() { + fcgiwrap_pgrp=$(/bin/ps -o ppid= $(cat ${pidfile})) + if [ -z "$fcgiwrap_pgrp" ] || ! kill -0 $fcgiwrap_pgrp; then + [ -n "$rc_fast" ] && return 0 + _run_rc_notrunning + return 1 + fi + fcgiwrap_pgrp_pids=$(/bin/pgrep -d ' ' -g ${fcgiwrap_pgrp}) + echo "Stopping ${name}." + kill -TERM -- -${fcgiwrap_pgrp} + wait_for_pids ${fcgiwrap_pgrp_pids} + # Workaround the fact that fcgiwrap doesn't cleanup his socket at stopping case ${fcgiwrap_socket} in unix*) @@ -104,7 +115,7 @@ procname="%%PREFIX%%/sbin/${name}" command="/usr/sbin/daemon" start_precmd="fcgiwrap_precmd" start_postcmd="fcgiwrap_postcmd" -stop_postcmd="fcgiwrap_cleansocket" +stop_cmd="fcgiwrap_stop" load_rc_config $name |