summaryrefslogtreecommitdiff
path: root/www/aolserver/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/aolserver/files')
-rw-r--r--www/aolserver/files/aolserver.in47
-rw-r--r--www/aolserver/files/aolserver.sh.in49
-rw-r--r--www/aolserver/files/patch-Makefile15
-rw-r--r--www/aolserver/files/patch-nssha1-nssha1.c12
-rw-r--r--www/aolserver/files/pkg-deinstall.in23
-rw-r--r--www/aolserver/files/pkg-install.in33
-rw-r--r--www/aolserver/files/pkg-message.in32
7 files changed, 101 insertions, 110 deletions
diff --git a/www/aolserver/files/aolserver.in b/www/aolserver/files/aolserver.in
new file mode 100644
index 000000000000..c1f6d127de5d
--- /dev/null
+++ b/www/aolserver/files/aolserver.in
@@ -0,0 +1,47 @@
+#! /bin/sh
+#
+#
+# PROVIDE: aolserver
+# REQUIRE: DAEMON NETWORKING SERVERS
+#
+# Add the following line to /etc/rc.conf to enable aolserver:
+#
+# aolserver_enable="YES"
+#
+# Tweakable parameters for users to override in rc.conf
+
+. "%%RC_SUBR%%"
+
+name=aolserver
+
+load_rc_config ${name}
+: ${aolserver_enable="NO"}
+: ${aolserver_user="%%AOLSERVERUSER%%"}
+: ${aolserver_group="%%AOLSERVERGROUP%%"}
+: ${aolserver_home=%%AOLSERVERBASE%%}
+: ${aolserver_conf=${aolserver_home}/sample-config.tcl}
+: ${aolserver_flags="-u ${aolserver_user} -g ${aolserver_group}"}
+: ${aolserver_prog=${aolserver_home}/bin/nsd}
+: ${aolserver_pidfile=/var/run/aolserver.pid}
+
+rcvar=`set_rcvar`
+pidfile=${aolserver_pidfile}
+start_postcmd="start_postcmd"
+stop_postcmd="stop_postcmd"
+required_files=${aolserver_conf}
+command=${aolserver_prog}
+command_args="-t ${aolserver_conf}"
+procname=${aolserver_prog}
+
+start_postcmd()
+{
+ PID=`pgrep -U ${aolserver_user} -f ${aolserver_conf}`
+ [ -n "${PID}" ] && echo ${PID} > ${pidfile}
+}
+
+stop_postcmd()
+{
+ [ -f "${pidfile}" ] && rm ${pidfile}
+}
+
+run_rc_command "$1"
diff --git a/www/aolserver/files/aolserver.sh.in b/www/aolserver/files/aolserver.sh.in
deleted file mode 100644
index 09363bab12dd..000000000000
--- a/www/aolserver/files/aolserver.sh.in
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-#
-#
-# PROVIDE: aolserver
-# REQUIRE: DAEMON NETWORKING SERVERS
-#
-# Add the following line to /etc/rc.conf to enable aolserver:
-#
-# aolserver_enable="YES"
-#
-# Tweakable parameters for users to override in rc.conf
-
-aolserver_enable="${aolserver_enable-NO}"
-aolserver_home=%%PREFIX%%/aolserver
-aolserver_conf=${aolserver_home}/sample-config.tcl
-aolserver_flags="-u nobody -g nobody"
-aolserver_prog=${aolserver_home}/bin/nsd
-
-. "%%RC_SUBR%%"
-
-name=aolserver
-load_rc_config ${name}
-pid=`ps -ax | grep ${aolserver_conf} | grep -v grep| awk -F' ' '{print $1}'`
-rcvar=`set_rcvar`
-required_files=${aolserver_conf}
-command=${aolserver_prog}
-procname=${aolserver_prog}
-
-stop_cmd="if [ ! -z \"${pid}\" ] ; then \
- echo \"Notice: stopping aolserver.... Kill -TERM ${pid}\" ; \
- kill -TERM ${pid} ; \
- else \
- echo \"Notice: No aolserver process found. Nothing to stop.\" ; \
- fi"
-start_cmd="if [ ! -z \"${pid}\" ] ; then \
- echo \"Notice: aolserver is already running.\"; \
- else \
- echo \"Notice: starting aolserver.......\" ; \
- echo \"Issuing command: ${command} -t ${aolserver_conf} ${aolserver_flags} \" ; \
- ${command} -t ${aolserver_conf} ${aolserver_flags}; \
- fi"
-status_cmd="if [ ! -z \"${pid}\" ] ; then \
- echo \"Notice: aolserver is running with pid ${pid}\" ; \
- else \
- echo \"Notice: aolserver is not running\" ; \
- fi"
-
-run_rc_command "$1"
-
diff --git a/www/aolserver/files/patch-Makefile b/www/aolserver/files/patch-Makefile
new file mode 100644
index 000000000000..ab8023cd8234
--- /dev/null
+++ b/www/aolserver/files/patch-Makefile
@@ -0,0 +1,15 @@
+--- Makefile.orig Thu Oct 12 12:41:17 2006
++++ Makefile Thu Oct 12 12:45:08 2006
+@@ -75,6 +75,12 @@
+ install-docs:
+ $(MAKEALL) install doc
+
++install-html:
++ $(MAKEALL) install-html doc
++
++install-man:
++ $(MAKEALL) install-man doc
++
+ distclean: clean
+ $(RM) include/ns.mak include/ns.bak \
+ config.status config.log config.cache
diff --git a/www/aolserver/files/patch-nssha1-nssha1.c b/www/aolserver/files/patch-nssha1-nssha1.c
deleted file mode 100644
index 07f4365d6251..000000000000
--- a/www/aolserver/files/patch-nssha1-nssha1.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- ../nssha1-0.1/nssha1.c.orig Mon Sep 30 02:25:04 2002
-+++ ../nssha1-0.1/nssha1.c Thu Jul 28 14:47:01 2005
-@@ -136,9 +136,6 @@
- return NS_OK;
- }
-
--typedef unsigned int u_int32_t;
--typedef unsigned char u_int8_t;
--
- /*** FROM sha.h: ***/
-
- /*
diff --git a/www/aolserver/files/pkg-deinstall.in b/www/aolserver/files/pkg-deinstall.in
new file mode 100644
index 000000000000..d5c9952f72ac
--- /dev/null
+++ b/www/aolserver/files/pkg-deinstall.in
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+AOLSERVERBASE=%%AOLSERVERBASE%%
+
+post-deinstall() {
+ [ -d ${AOLSERVERBASE} ] && {
+ echo ""
+ echo "******** NOTICE ********"
+ echo "AOLserver has beed deinstalled."
+ echo "You may need to remove ${AOLSERVERBASE} manually."
+ echo ""
+ }
+ return 0
+}
+
+case $2 in
+
+POST-DEINSTALL)
+ post-deinstall
+ ;;
+*)
+ ;;
+esac
diff --git a/www/aolserver/files/pkg-install.in b/www/aolserver/files/pkg-install.in
index f04e99563569..901d0c348501 100644
--- a/www/aolserver/files/pkg-install.in
+++ b/www/aolserver/files/pkg-install.in
@@ -3,35 +3,19 @@
PATH=/bin:/usr/sbin:/usr/bin
EXAMPLESDIR=%%EXAMPLESDIR%%
AOLSERVERBASE=%%AOLSERVERBASE%%
+AOLSERVERUSER=%%AOLSERVERUSER%%
+AOLSERVERGROUP=%%AOLSERVERGROUP%%
post-install() {
echo "Running post-install script"
echo "Setting file permissions"
- chown nobody:nogroup ${AOLSERVERBASE}/servers/server1/modules/nslog
- chown nobody:nogroup ${AOLSERVERBASE}/log
+ mkdir -p ${AOLSERVERBASE}/servers/server1/pages
+ mkdir -p ${AOLSERVERBASE}/servers/server1/modules/nslog
+ mkdir -p ${AOLSERVERBASE}/log
+ echo "Welcome. You have made it. Aolserver has started." >> ${AOLSERVERBASE}/servers/server1/pages/index.html
+ chown ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/servers/server1/modules/nslog
+ chown ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/log
chmod 755 ${AOLSERVERBASE}
- chmod 755 ${EXAMPLESDIR}/aolserver.sh.sample
-
- echo "Checking Aolserver processes before (re)start"
- pid1=`ps -ax | grep sample-config | grep -v grep| awk -F' ' '{print $1}'`;
- if test "$pid1" = "" ; then
- echo ""
- else
- echo "Killing sample-config pid"
- kill $pid1;
- fi
-
- pid2=`ps -ax | grep nsd | grep -v grep| awk -F' ' '{print $1}'`;
- if test "$pid2" = "" ; then
- echo "Good. No running Aolserver process.";
- else
- echo "Warning: at least one non-standard Aolserver process is running..."
- echo "We are still starting Aolserver, but it may not be able to listen on the same address:port"
- echo "FYI: killall -9 nsd stops all processes. Or change the IP-address in config.tcl, then restart."
- fi
-
- echo "Starting aolserver: ${AOLSERVERBASE}/bin/nsd -t ${AOLSERVERBASE}/sample-config.tcl -u nobody -g nogroup"
- ${AOLSERVERBASE}/bin/nsd -t ${AOLSERVERBASE}/sample-config.tcl -u nobody -g nogroup
}
case $2 in
@@ -40,7 +24,6 @@ POST-INSTALL)
post-install
;;
*)
- echo "unknown pkg-install option"
;;
esac
diff --git a/www/aolserver/files/pkg-message.in b/www/aolserver/files/pkg-message.in
index e506db094069..a34463afc682 100644
--- a/www/aolserver/files/pkg-message.in
+++ b/www/aolserver/files/pkg-message.in
@@ -1,31 +1,15 @@
- ******** READ THIS ********
+******** NOTICE ********
-Congratulations! You have installed the web application server, Aolserver.
+Congratulations! You have installed the web application server, AOLserver.
-Test aolserver:
- # %%AOLSERVERBASE%%/bin/nsd -t %%AOLSERVERBASE%%/sample-config.tcl -u nobody -g nogroup
+A start/stop script has been installed into %%PREFIX%%/etc/rc.d/aolserver
+To enable aolserver, set aolserver_enable="YES" in your rc.conf.
-Then, with your favorite browser, something like:
- # lynx localhost:8000
-
-Kill aolserver:
- # killall nsd
-
-A sample start/stop script is in %%PREFIX%%/etc/rc.d/aolserver.sh.sample
-
-Generally one would copy %%AOLSERVERBASE%%/sample-config.tcl to
-%%AOLSERVERBASE%%/nsd.tcl and season to taste. For example:
-set address to 0.0.0.0 or the actual ip-address and set httpport to 80.
-
-For AOLserver 4 using privileged ports (usually < 1024), add the flag
--b youraddress:yourport. So:
- # %%AOLSERVERBASE%%/bin/nsd -t %%AOLSERVERBASE%%/sample-config.tcl \
- -u nobody -g nogroup -b 0.0.0.0:80
- # lynx localhost
-
-Remember: THIS MESSAGE is in PORTSDIR/www/aolserver/files/pkg-message.in.
+See %%PREFIX%%/etc/rc.d/aolserver for various configuration options like
+chosing a different configuration file.
-Aldert
aldert@nooitgedagt.net
- ******** READ THE INFORMATION ABOVE ********
+-Martin Matuska
+martin@matuska.org