X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fcreate_postgresql_database.in;h=50fe6c4bf06509f58f9f35e7d8af706f51ba1d80;hb=fb71554fa28e81b6125c2063e028976df18334f2;hp=8ee437d85f695d74a59819fb44857e30d7fc5b99;hpb=df5a4b58cbe24b47d9da011684f8b01e8b730b60;p=bacula%2Fbacula diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 8ee437d85f..50fe6c4bf0 100644 --- a/bacula/src/cats/create_postgresql_database.in +++ b/bacula/src/cats/create_postgresql_database.in @@ -3,24 +3,59 @@ # shell script to create Bacula database(s) # -bindir=@SQL_BINDIR@ +PATH="@SQL_BINDIR@:$PATH" +db_name=${db_name:-@db_name@} +# # use SQL_ASCII to be able to put any filename into # the database even those created with unusual character sets -ENCODING="ENCODING 'SQL_ASCII'" -# use UTF8 if you are using standard Unix/Linux LANG specifications -# that use UTF8 -- this is normally the default and *should* be -# your standard. Bacula consoles work correctly *only* with UTF8. -#ENCODING="ENCODING 'UTF8'" - -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