#!/bin/sh
which dirname >/dev/null 
# does dirname exit?
if [ $? = 0 ] ; then
  cwd=`dirname $0`
  if [ x$cwd = x. ]; then
     cwd=`pwd`
  fi
  if [ x$cwd = x/usr/local/sbin ] ; then
     echo "bconsole not properly installed."  
     exit 1
  fi
fi
if [ x/usr/local/sbin = x/usr/local/etc ]; then
   echo "bconsole not properly installed."
   exit 1
fi
if [ $# = 1 ] ; then
   echo "doing bconsole $1.conf"
   /usr/local/sbin/bconsole -c $1.conf
else
   /usr/local/sbin/bconsole -c /usr/local/etc/bconsole.conf
fi
