#!/bin/sh
#
-# shell script to create Bacula database(s)
-#
-#
-# Bacula® - The Network Backup Solution
-#
-# Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
+# Copyright (C) 2000-2017 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
#
-# 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.
+# shell script to create Bacula database(s)
#
PATH="@POSTGRESQL_BINDIR@:$PATH"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!! Creation of ${db_name} database failed. !!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ exit 1
fi
-if psql -l ${dbname} $* | grep " ${db_name}.*SQL_ASCII" >/dev/null; then
+if psql -l | grep " ${db_name}.*SQL_ASCII" >/dev/null; then
echo "Database encoding OK"
else
echo " "
echo "Database encoding bad. Do not use this database"
echo " "
+ exit 1
fi