diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2017-05-26 16:54:40 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2017-05-26 16:54:40 +0000 |
commit | e9fafcaa9d611ae8e70dd4c1d418207fb94c2715 (patch) | |
tree | 704f9c2fcecf5259083ebe8a2c9613418194ef25 /www/fcgiwrap | |
parent | 5147a61834ef70db99b3071629e963963df07408 (diff) | |
download | ports-e9fafcaa9d611ae8e70dd4c1d418207fb94c2715.tar.gz ports-e9fafcaa9d611ae8e70dd4c1d418207fb94c2715.zip |
Notes
Diffstat (limited to 'www/fcgiwrap')
-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 |