1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Provide a better rc.d startup script.

PR:		18419
Submitted by:	Matthew Braithwaite <mab@red-bean.com>
This commit is contained in:
Steve Price 2000-05-29 03:00:28 +00:00
parent afae90fc33
commit aa74835d75
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28866
2 changed files with 24 additions and 3 deletions

View File

@ -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

View File

@ -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