diff options
author | Steve Price <steve@FreeBSD.org> | 2000-05-29 03:00:28 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 2000-05-29 03:00:28 +0000 |
commit | aa74835d755fb8ffdf104f73473a0a0690a7845f (patch) | |
tree | f25fe964c77607ab818b37e056161c0eca314ae8 /www/aolserver | |
parent | Install togl.[ho] too. (diff) |
Provide a better rc.d startup script.
PR: 18419
Submitted by: Matthew Braithwaite <mab@red-bean.com>
Notes
Notes:
svn path=/head/; revision=28866
Diffstat (limited to 'www/aolserver')
-rw-r--r-- | www/aolserver/Makefile | 6 | ||||
-rw-r--r-- | www/aolserver/files/aolserver.sh | 21 |
2 files changed, 24 insertions, 3 deletions
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 |