]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/drop_mysql_database.in
ebl Small fix on accurate code for new restore menu option
[bacula/bacula] / bacula / src / cats / drop_mysql_database.in
1 #!/bin/sh
2 #
3 # shell script to drop Bacula database(s)
4 #
5
6 bindir=@SQL_BINDIR@
7 db_name=@db_name@
8
9 if test xmysql = x@DB_TYPE@ ; then 
10   $bindir/mysql $* -f <<END-OF-DATA
11     DROP DATABASE ${db_name};
12 END-OF-DATA
13   if test $? -eq 0 ; then
14     echo "Drop of ${db_name} database succeeded."
15   else
16     echo "Drop of ${db_name} database failed."
17   fi
18 else
19   echo "Bacula is not configured for a MySQL database."
20 fi
21 exit 0