From d9ff7d8b5a8c19e8e5c1e4178f2db3f617b19e15 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 29 May 2000 03:00:28 +0000 Subject: Provide a better rc.d startup script. PR: 18419 Submitted by: Matthew Braithwaite --- www/aolserver/Makefile | 6 +++--- www/aolserver/files/aolserver.sh | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 www/aolserver/files/aolserver.sh (limited to 'www/aolserver') diff --git a/www/aolserver/Makefile b/www/aolserver/Makefile index 7f50dd56c247..d8639129f899 100644 --- a/www/aolserver/Makefile +++ b/www/aolserver/Makefile @@ -39,9 +39,9 @@ post-install: # Startup file @if [ ! -f ${PREFIX}/etc/rc.d/aolserver.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/aolserver.sh startup file."; \ - ${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/aolserver.sh; \ - ${ECHO} "[ -x ${PREFIX}/aolserver/bin/nsd8x ] && ${PREFIX}/aolserver/bin/nsd8x -u nobody -t ${PREFIX}/aolserver/nsd.tcl && ${ECHO} -n ' aolserver'" >> ${PREFIX}/etc/rc.d/aolserver.sh; \ - ${CHMOD} 751 ${PREFIX}/etc/rc.d/aolserver.sh; \ + ${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/aolserver.sh \ + >${PREFIX}/etc/rc.d/aolserver.sh ; \ + ${CHMOD} 755 ${PREFIX}/etc/rc.d/aolserver.sh; \ fi @${CAT} ${PKGDIR}/MESSAGE diff --git a/www/aolserver/files/aolserver.sh b/www/aolserver/files/aolserver.sh new file mode 100644 index 000000000000..9c8a1e90bd04 --- /dev/null +++ b/www/aolserver/files/aolserver.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +PREFIX=%%PREFIX%%/aolserver +CONFIG=${PREFIX}/nsd.tcl + +case "$1" in + +start) + ${PREFIX}/bin/nsd8x -t ${CONFIG} -u nsadmin -g nsadmin + ;; + +stop) + ${PREFIX}/bin/nsd8x -t ${CONFIG} -u nsadmin -g nsadmin -K + ;; + +*) + echo "usage: $0 {start|stop}" 1>&2 + exit 64 + ;; + +esac -- cgit