X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fcreate_postgresql_database.in;h=e5d8644b363fed931ed3a36665325567b3bb3a3d;hb=057312b2302ae774d35cd41e7ff5a682df841c0b;hp=0debbc67efb6aa4dc1264fd6a25bbff85307b694;hpb=79d137fee9fa63250f3fcb5125d7171a34c61761;p=bacula%2Fbacula diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 0debbc67ef..e5d8644b36 100644 --- a/bacula/src/cats/create_postgresql_database.in +++ b/bacula/src/cats/create_postgresql_database.in @@ -3,31 +3,59 @@ # shell script to create Bacula database(s) # -bindir=@SQL_BINDIR@ -db_name=@db_name@ +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 works correctly *only* with correct UTF8. -# -# Note, with this encoding, if you have any "weird" filenames on -# your system (names generated from Win32 or Mac OS), you may -# get Bacula batch insert failures. -# -#ENCODING="ENCODING 'UTF8'" - -if $bindir/psql -f - -d template1 $* </dev/null; then + echo "Database encoding OK" +else + echo " " + echo "Database encoding bad. Do not use this database" + echo " " fi -exit 0