]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/create_postgresql_database.in
Big backport from Enterprise
[bacula/bacula] / bacula / src / cats / create_postgresql_database.in
index c9e7f0cd7f0cf4a8cf6b5ebea182d90c1138eca6..ac15d524e822a2658b3c8018b5c310ddd8e1d637 100644 (file)
@@ -1,21 +1,9 @@
 #!/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"
@@ -66,11 +54,13 @@ else
    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