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/files | |
parent | 7715ef0993cfe6dc7a34e1a3da52a53a92f53aed (diff) | |
download | ports-fc6f4373fc221f4891ca0b4334050f68da1d01af.tar.gz ports-fc6f4373fc221f4891ca0b4334050f68da1d01af.zip |
- 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/files')
-rw-r--r-- | www/aolserver/files/aolserver.sh.in | 40 |
1 files changed, 27 insertions, 13 deletions
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" |