From: Dan Langille Date: Sun, 21 Dec 2003 23:23:52 +0000 (+0000) Subject: Add file X-Git-Tag: Release-1.34.0~232 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ec3a61fa582ae2b9fe6d65035cec00282430e0e;p=bacula%2Fbacula Add file git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@927 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/drop_bacula_database.in b/bacula/src/cats/drop_bacula_database.in new file mode 100755 index 0000000000..d4aed3e00e --- /dev/null +++ b/bacula/src/cats/drop_bacula_database.in @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Drop Bacula database -- works for whatever is configured, +# MySQL, SQLite, PostgreSQL +# +if test xsqlite = x@DB_NAME@ ; then + @scriptdir@/drop_sqlite_database + echo "Dropped SQLite database" +else + if test xmysql = x@DB_NAME@ ; then + echo "Making MySQL database" + @scriptdir@/drop_mysql_database $* + echo "Dropped MySQL database" + else + # hardcoded database name - should be a parameter + @scriptdir@/drop_postgresql_database bacula + echo "Dropped PostgreSQL database" + fi +fi diff --git a/bacula/src/cats/drop_bdb_database.in b/bacula/src/cats/drop_bdb_database.in new file mode 100644 index 0000000000..f52659024b --- /dev/null +++ b/bacula/src/cats/drop_bdb_database.in @@ -0,0 +1,5 @@ +#!/bin/sh +# +# shell script to drop Bacula database(s) +# +# Nothing to do diff --git a/bacula/src/cats/drop_mysql_database.in b/bacula/src/cats/drop_mysql_database.in new file mode 100644 index 0000000000..e5dfb60e8c --- /dev/null +++ b/bacula/src/cats/drop_mysql_database.in @@ -0,0 +1,16 @@ +#!/bin/sh +# +# shell script to drop Bacula database(s) +# + +bindir=@SQL_BINDIR@ + +if $bindir/mysql $* -f <