diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-09-28 11:12:33 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-09-28 11:12:33 +0000 |
commit | fc6f4373fc221f4891ca0b4334050f68da1d01af (patch) | |
tree | 54ebabdea485c4ce112ebd302f836421ab9776e1 /www/aolserver | |
parent | - Correctly detect infrared control interface lirc (diff) |
- Fix/update rc script (-K doesn't exist anymore, fix rc.subr path, ...).
PR: ports/86658
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=143681
Diffstat (limited to 'www/aolserver')
-rw-r--r-- | www/aolserver/Makefile | 1 | ||||
-rw-r--r-- | www/aolserver/files/aolserver.sh.in | 40 |
2 files changed, 28 insertions, 13 deletions
diff --git a/www/aolserver/Makefile b/www/aolserver/Makefile index 30093bbe44f0..bedd3edfcd4f 100644 --- a/www/aolserver/Makefile +++ b/www/aolserver/Makefile @@ -7,6 +7,7 @@ PORTNAME= aolserver PORTVERSION= 4.0.10 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= aolserver diff --git a/www/aolserver/files/aolserver.sh.in b/www/aolserver/files/aolserver.sh.in index 44ba268a6cff..b0c30f5331c2 100644 --- a/www/aolserver/files/aolserver.sh.in +++ b/www/aolserver/files/aolserver.sh.in @@ -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 +. "%%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" |