#!/bin/bash
#
# shell script to create Bacula database(s)
#

bindir=/usr/bin

if $bindir/psql -f - -d template1 $* <<END-OF-DATA
CREATE DATABASE bacula;
END-OF-DATA
then
   echo "Creation of bacula database succeeded."
   exit 0
else
   echo "Creation of bacula database failed."
   exit 1
fi
