From d9f70e1d274336d65a4dda1581c7c40bb6d0a4b6 Mon Sep 17 00:00:00 2001 From: Dan Langille Date: Sun, 21 Dec 2003 23:23:52 +0000 Subject: [PATCH] Add file git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@927 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/drop_bacula_database.in | 19 +++++++++++++++++++ bacula/src/cats/drop_bdb_database.in | 5 +++++ bacula/src/cats/drop_mysql_database.in | 16 ++++++++++++++++ bacula/src/cats/drop_postgresql_database.in | 16 ++++++++++++++++ bacula/src/cats/drop_sqlite_database.in | 11 +++++++++++ 5 files changed, 67 insertions(+) create mode 100755 bacula/src/cats/drop_bacula_database.in create mode 100644 bacula/src/cats/drop_bdb_database.in create mode 100644 bacula/src/cats/drop_mysql_database.in create mode 100644 bacula/src/cats/drop_postgresql_database.in create mode 100644 bacula/src/cats/drop_sqlite_database.in 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 <