Date: Wed, 28 Sep 2005 07:47:33 +0200 (CEST) From: Charlie & <root@therapie.sportmedisch.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: aldert@nooitgedagt.net Subject: ports/86658: [MAINTAINER-UPDATE] www/aolserver: fixed broken rc.d script Message-ID: <200509280547.j8S5lX4I001144@therapie.sportmedisch.net> Resent-Message-ID: <200509280140.j8S1eHVv046624@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 86658 >Category: ports >Synopsis: [MAINTAINER-UPDATE] www/aolserver: fixed broken rc.d script >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Sep 28 01:40:17 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Aldert Nooitgedagt >Release: FreeBSD 5.4-RELEASE i386 >Organization: >Environment: System: FreeBSD therapie.sportmedisch.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 8 10:21:06 UTC >Description: -updated rc.d script -was broken (-K flag isn't available anymore). Need to kill pid. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- aolserver-4.0.10.patch begins here --- Index: files/aolserver.sh.in =================================================================== RCS file: /home/ncvs/ports/www/aolserver/files/aolserver.sh.in,v retrieving revision 1.1 diff -u -r1.1 aolserver.sh.in --- files/aolserver.sh.in 17 Jul 2005 17:03:18 -0000 1.1 +++ files/aolserver.sh.in 28 Sep 2005 01:27:44 -0000 @@ -13,24 +13,38 @@ aolserver_enable=NO aolserver_home=%%PREFIX%%/aolserver -aolserver_conf=${aolserver_home}/nsd.tcl -aolserver_flags="-t ${aolserver_conf} -u nobody -g nobody" -aolserver_prog=nsd8x +aolserver_conf=${aolserver_home}/sample-config.tcl +aolserver_flags="-u nobody -g nobody" +aolserver_prog=${aolserver_home}/bin/nsd . /etc/rc.subr name=aolserver -rcvar=$(set_rcvar) +load_rc_config ${name} +pid=`ps -ax | grep ${aolserver_conf} | grep -v grep| awk -F' ' '{print $1}'` +rcvar=`set_rcvar` required_files=${aolserver_conf} -command=${aolserver_home}/bin/${aolserver_prog} -procname=${aolserver_home}/bin/${aolserver_prog} - -stop_cmd="stop_cmd" +command=${aolserver_prog} +procname=${aolserver_prog} -stop_cmd() { - ${command} ${aolserver_flags} -K -} +stop_cmd="if [ ! -z \"${pid}\" ] ; then \ + echo \"Notice: stopping aolserver.... Kill -TERM ${pid}\" ; \ + kill -TERM ${pid} ; \ + else \ + echo \"Notice: No aolserver process found. Nothing to stop.\" ; \ + fi" +start_cmd="if [ ! -z \"${pid}\" ] ; then \ + echo \"Notice: aolserver is already running.\"; \ + else \ + echo \"Notice: starting aolserver.......\" ; \ + echo \"Issuing command: ${command} -t ${aolserver_conf} ${aolserver_flags} \" ; \ + ${command} -t ${aolserver_conf} ${aolserver_flags}; \ + fi" +status_cmd="if [ ! -z \"${pid}\" ] ; then \ + echo \"Notice: aolserver is running with pid ${pid}\" ; \ + else \ + echo \"Notice: aolserver is not running\" ; \ + fi" -load_rc_config ${name} run_rc_command "$1" --- aolserver-4.0.10.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509280547.j8S5lX4I001144>