#!/bin/sh
#
# shell script to drop Bacula database(s)
#

bindir=/usr/local/bin
db_name=bacula

if test xmysql = xmysql ; then 
  $bindir/mysql $* -f <<END-OF-DATA
    DROP DATABASE ${db_name};
END-OF-DATA
  if test $? -eq 0 ; then
    echo "Drop of ${db_name} database succeeded."
  else
    echo "Drop of ${db_name} database failed."
  fi
else
  echo "Bacula is not configured for a MySQL database."
fi
exit 0
