#!/bin/sh
#
-# shell script to create Bacula database(s)
+# Copyright (C) 2000-2017 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
#
-# Author: Kern Sibbald
-# License: LGPLv3
+# 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