X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fcreate_postgresql_database.in;h=50fe6c4bf06509f58f9f35e7d8af706f51ba1d80;hb=fb71554fa28e81b6125c2063e028976df18334f2;hp=1cbe61e9e6a4f9de938f9707a7c3f61b1b1b8930;hpb=9f51789180888121b9817c30a6896597213dbf4c;p=bacula%2Fbacula diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 1cbe61e9e6..50fe6c4bf0 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 -f - -d template1 $* </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