#!/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
sleep 10

exec /usr/local/aolserver/bin/nsd-postgres -it /var/lib/aolserver/service0/etc/config.tcl -u service0 -g web

# For AOLserver 4 using privileged ports (usually < 1024), add the flag:
# -b youraddress:yourport
# if also using ssl, the flag becomes:
# -b youraddress:yourport,youraddress:sslport