X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fcreate_postgresql_database.in;h=e5d8644b363fed931ed3a36665325567b3bb3a3d;hb=2d78ab3b53e7f238d1dfb06420ba403e743f0bb0;hp=5ec7a8f7e945835dd333d2a374ad87431a315662;hpb=e2a19cf54a68b09d336140af29b78a3097bce95d;p=bacula%2Fbacula diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 5ec7a8f7e9..e5d8644b36 100644 --- a/bacula/src/cats/create_postgresql_database.in +++ b/bacula/src/cats/create_postgresql_database.in @@ -3,14 +3,59 @@ # shell script to create Bacula database(s) # -bindir=@SQL_BINDIR@ +PATH="@SQL_BINDIR@:$PATH" +db_name=${db_name:-@db_name@} -if $bindir/psql template1 $* -f - </dev/null; then + echo "Database encoding OK" else - echo "Creation of bacula database failed." + echo " " + echo "Database encoding bad. Do not use this database" + echo " " fi -exit 0