]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_mysql_database.in
Split messages line by line before sending it to syslog() fix #3325
[bacula/bacula] / bacula / src / cats / drop_mysql_database.in
index aa447bc3bf6deaf65ee540c8ec718fe07316d2d0..8cefa9c31783e71265e49e8c07d39c1ba51bdce0 100644 (file)
@@ -3,18 +3,15 @@
 # shell script to drop Bacula database(s)
 #
 
-bindir=@SQL_BINDIR@
+bindir=@MYSQL_BINDIR@
+db_name=@db_name@
 
-if test xmysql = x@DB_NAME@ ; then 
-  $bindir/mysql $* -f <<END-OF-DATA
-    DROP DATABASE bacula;
+$bindir/mysql $* -f <<END-OF-DATA
+  DROP DATABASE ${db_name};
 END-OF-DATA
-  if test $? -eq 0 ; then
-    echo "Drop of bacula database succeeded."
-  else
-    echo "Drop of bacula database failed."
-  fi
+if test $? -eq 0 ; then
+  echo "Drop of ${db_name} database succeeded."
 else
-  echo "Bacula is not configured for a MySQL database."
+  echo "Drop of ${db_name} database failed."
 fi
 exit 0