diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-17 17:03:18 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-17 17:03:18 +0000 |
commit | 459626c99c252c6b0ef1fd2183cd89f88e1a120a (patch) | |
tree | dc3e497894d10e53a51dd2df1ad4abdb2fc1fa2c /www/aolserver/files | |
parent | 67488695ea8d642425f6c9a7ed2d0da3abfe90e6 (diff) |
Notes
Diffstat (limited to 'www/aolserver/files')
-rw-r--r-- | www/aolserver/files/aolserver.sh.in (renamed from www/aolserver/files/aolserver.sh) | 1 | ||||
-rw-r--r-- | www/aolserver/files/patch-a | 11 | ||||
-rw-r--r-- | www/aolserver/files/patch-b | 40 | ||||
-rw-r--r-- | www/aolserver/files/patch-c | 24 | ||||
-rw-r--r-- | www/aolserver/files/pkg-install.in | 46 | ||||
-rw-r--r-- | www/aolserver/files/pkg-message.in | 36 |
6 files changed, 76 insertions, 82 deletions
diff --git a/www/aolserver/files/aolserver.sh b/www/aolserver/files/aolserver.sh.in index 834d58fff005..44ba268a6cff 100644 --- a/www/aolserver/files/aolserver.sh +++ b/www/aolserver/files/aolserver.sh.in @@ -33,3 +33,4 @@ stop_cmd() { load_rc_config ${name} run_rc_command "$1" + diff --git a/www/aolserver/files/patch-a b/www/aolserver/files/patch-a deleted file mode 100644 index 5576bbaaea27..000000000000 --- a/www/aolserver/files/patch-a +++ /dev/null @@ -1,11 +0,0 @@ ---- include/Makefile.global Fri Feb 15 11:39:00 2002 -+++ include/Makefile.global.new Fri Feb 15 11:39:00 2002 -@@ -259,7 +259,7 @@ - TCL76_DIR=tcl7.6 - ifeq (bsd, $(findstring bsd, $(PLATFORM))) - TCL76_LIB=libtcl76.a -- TCL8X_LIB=libtcl83g.a -+ TCL8X_LIB=libtcl8.3g.a - else - TCL76_LIB=libtcl7.6.a - TCL8X_LIB=libtcl8.3g.a diff --git a/www/aolserver/files/patch-b b/www/aolserver/files/patch-b deleted file mode 100644 index 3f82e84c9170..000000000000 --- a/www/aolserver/files/patch-b +++ /dev/null @@ -1,40 +0,0 @@ ---- nsd/nsmain.c Tue Apr 3 18:13:15 2001 -+++ nsd/nsmain.c.new Fri Feb 15 12:22:04 2002 -@@ -311,16 +311,10 @@ - /* - * Verify the uid/gid args. - */ -- -- if (garg != NULL) { -- gid = Ns_GetGid(garg); -- if (gid < 0) { -- gid = atoi(garg); -- if (gid == 0) { -- Ns_Fatal("nsmain: invalid group '%s'", garg); -- } -- } -- } -+ /* Reversed the order so this will actually work -+ * Jon Griffin <jon@jongriffin.com> 01/27/2001 -+ * -+ */ - if (uarg != NULL) { - uid = Ns_GetUid(uarg); - gid = Ns_GetUserGid(uarg); -@@ -329,6 +323,16 @@ - } - if (uid == 0) { - Ns_Fatal("nsmain: invalid user '%s'", uarg); -+ } -+ } -+ -+ if (garg != NULL) { -+ gid = Ns_GetGid(garg); -+ if (gid < 0) { -+ gid = atoi(garg); -+ if (gid == 0) { -+ Ns_Fatal("nsmain: invalid group '%s'", garg); -+ } - } - } - diff --git a/www/aolserver/files/patch-c b/www/aolserver/files/patch-c deleted file mode 100644 index 5716715a1947..000000000000 --- a/www/aolserver/files/patch-c +++ /dev/null @@ -1,24 +0,0 @@ ---- tcl8.3.2/unix/tclUnixPipe.c Thu Aug 17 17:46:15 2000 -+++ tcl8.3.2/unix/tclUnixPipe.c.new Fri Feb 15 12:30:19 2002 -@@ -950,12 +950,16 @@ - * nonblocking, the read will never block. - */ - -- bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead); -- if (bytesRead > -1) { -- return bytesRead; -+ while (1) { -+ bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead); -+ if (bytesRead > -1) { -+ return bytesRead; -+ } -+ if ( errno != EINTR ) { -+ *errorCodePtr = errno; -+ return -1; -+ } - } -- *errorCodePtr = errno; -- return -1; - } - - /* diff --git a/www/aolserver/files/pkg-install.in b/www/aolserver/files/pkg-install.in new file mode 100644 index 000000000000..f04e99563569 --- /dev/null +++ b/www/aolserver/files/pkg-install.in @@ -0,0 +1,46 @@ +#! /bin/sh + +PATH=/bin:/usr/sbin:/usr/bin +EXAMPLESDIR=%%EXAMPLESDIR%% +AOLSERVERBASE=%%AOLSERVERBASE%% + +post-install() { + echo "Running post-install script" + echo "Setting file permissions" + chown nobody:nogroup ${AOLSERVERBASE}/servers/server1/modules/nslog + chown nobody:nogroup ${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 + +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 0343be321bea..e506db094069 100644 --- a/www/aolserver/files/pkg-message.in +++ b/www/aolserver/files/pkg-message.in @@ -1,9 +1,31 @@ + ******** READ THIS ******** -Assuming you have changed to %%PREFIX%%, please copy -aolserver/sample-config.tcl to aolserver/nsd.tcl and season to taste. -An example server is in at aolserver/servers/server1, and you should -similarly copy the contents of this directory to, e.g., -aolserver/servers/www.mydomain.com before modifying them. +Congratulations! You have installed the web application server, Aolserver. -These files are examples only and will be deleted if you remove this -port. +Test aolserver: + # %%AOLSERVERBASE%%/bin/nsd -t %%AOLSERVERBASE%%/sample-config.tcl -u nobody -g nogroup + +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. + +-Aldert +aldert@nooitgedagt.net + + ******** READ THE INFORMATION ABOVE ******** |