#!/bin/sh 

# aolserver4 recommends descriptors limit (FD_SETSIZE) to be set to 1024, 
# which is standard for most OS distributions
# For freebsd systems, uncomment following line:
# ulimit -n 1024

# give time for Postgres to come up
# see http://openacs.org/forums/message-view?message_id=176100
sleep 4

. /etc/aolserver4/conf.d/dotlrn.sh

DAEMON="/usr/lib/aolserver4/bin/nsd"
CONF="/etc/dotlrn/config.tcl"

exec $DAEMON -it $CONF -u $AOL_USER -g $AOL_GROUP -b $AOL_ADDRESS:$AOL_PORT

# For AOLserver 4 using privileged ports (usually < 1024), add the flag
# -b youraddress:yourport to the nsd command
