aboutsummaryrefslogtreecommitdiffstats
path: root/www/aolserver
diff options
context:
space:
mode:
Diffstat (limited to 'www/aolserver')
-rw-r--r--www/aolserver/Makefile6
-rw-r--r--www/aolserver/files/aolserver.sh21
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