#!/bin/sh
#
# shell script to create Bacula database(s)
#
#
#  Bacula® - The Network Backup Solution
#
#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
#
#  The main author of Bacula is Kern Sibbald, with contributions from many
#  others, a complete list can be found in the file AUTHORS.
#
#  You may use this file and others of this release according to the
#  license defined in the LICENSE file, which includes the Affero General
#  Public License, v3.0 ("AGPLv3") and some additional permissions and
#  terms pursuant to its AGPLv3 Section 7.
#
#  Bacula® is a registered trademark of Kern Sibbald.
#

bindir=/usr/local/bin
db_name=bacula

if $bindir/mysql $* -f <<END-OF-DATA
CREATE DATABASE ${db_name};
END-OF-DATA
then
   echo "Creation of ${db_name} database succeeded."
else
   echo "Creation of ${db_name} database failed."
fi
exit 0
