X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fcreate_postgresql_database.in;h=50fe6c4bf06509f58f9f35e7d8af706f51ba1d80;hb=fb71554fa28e81b6125c2063e028976df18334f2;hp=2d9e43f3d0727aceb8f565196bbd7c196e485b6c;hpb=49f732e9a5d77f59f1560b32cd5f1298709f21ba;p=bacula%2Fbacula diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 2d9e43f3d0..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 - </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