#! /bin/sh

# 
# Edit LD_LIBRARY_PATH with all the directories of the libraries 
# that ODBC needs to find.
#
LD_LIBRARY_PATH="/usr/local/lib:/usr/local/mysql/lib:/usr/lib:/lib" ; export LD_LIBRARY_PATH

case "$1" in
  start)
	echo "Starting ODBC bridge... "
	/usr/local/sbin/server &
	;;
  stop)
	echo "Stopping ODBC bridge... "
        kill `cat /usr/local/var/odbcbridge/odbcbridge.pid`
	;;
  *)
	echo "Usage: odbcserver {start|stop}" >&2
	exit 1
	;;
esac

exit 0
