]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_mysql_tables.in
Add retry for opening batch db if it fails.
[bacula/bacula] / bacula / src / cats / drop_mysql_tables.in
index fbe87274075011c8fa8e5a3d4e5e91e5aa292eb5..e291759cbde6bb78708a1a4baae027e3ba363eef 100644 (file)
@@ -3,9 +3,10 @@
 # shell script to delete Bacula tables for MySQL
 
 bindir=@SQL_BINDIR@
+db_name=@db_name@
 
 if $bindir/mysql $* <<END-OF-DATA
-USE bacula;
+USE ${db_name};
 DROP TABLE IF EXISTS Filename;
 DROP TABLE IF EXISTS Path;
 DROP TABLE IF EXISTS LongName;
@@ -33,8 +34,8 @@ DROP TABLE IF EXISTS Location;
 DROP TABLE IF EXISTS LocationLog;
 END-OF-DATA
 then
-   echo "Deletion of Bacula MySQL tables succeeded."
+   echo "Deletion of ${db_name} MySQL tables succeeded."
 else
-   echo "Deletion of Bacula MySQL tables failed."
+   echo "Deletion of ${db_name} MySQL tables failed."
 fi
 exit 0