diff options
author | steve <steve@FreeBSD.org> | 2000-05-29 11:00:28 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 2000-05-29 11:00:28 +0800 |
commit | d9ff7d8b5a8c19e8e5c1e4178f2db3f617b19e15 (patch) | |
tree | 3e4f81c715e795c479d228cd18c7b64dedc1c258 /www/aolserver | |
parent | 3dc7d078b375ce6699382b4d79ee786cbdcaae27 (diff) | |
download | freebsd-ports-gnome-d9ff7d8b5a8c19e8e5c1e4178f2db3f617b19e15.tar.gz freebsd-ports-gnome-d9ff7d8b5a8c19e8e5c1e4178f2db3f617b19e15.tar.zst freebsd-ports-gnome-d9ff7d8b5a8c19e8e5c1e4178f2db3f617b19e15.zip |
Provide a better rc.d startup script.
PR: 18419
Submitted by: Matthew Braithwaite <mab@red-bean.com>
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 |