|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
# PostgreSQL
#!/bin/sh
#
# Start the AOLServer HTTP server.
#
NAME="OpenACS on service1"
SERVICEPATH=/var/lib/aolserver/service1
PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/pgsql/bin
trap "" 1
start()
{
echo -n "Starting web server: $NAME"
echo -e -n "\r"
#!/bin/sh
#we need to export the library stuff first
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
export PATH=$PATH:/usr/local/pgsql/bin
# give time for Postgres to come up
sleep 1
exec /usr/sbin/aolserver4-nsd -it $SERVICEPATH/etc/config.tcl -u service1 -g web &
# For AOLserver 4 using privileged ports (usually < 1024), add the flag
# -b youraddress:yourport
echo ""
}
stop()
{
echo -n "Stopping web server: $NAME"
killall aolserver4-nsd
echo ""
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 1
;;
esac
echo -n -e "\c\r\n"
exit 0
# End of script
# avoid pid not found errors in the log