3 # shell script to create Bacula database(s)
9 # use SQL_ASCII to be able to put any filename into
10 # the database even those created with unusual character sets
11 ENCODING="ENCODING 'SQL_ASCII'"
12 # use UTF8 if you are using standard Unix/Linux LANG specifications
13 # that use UTF8 -- this is normally the default and *should* be
14 # your standard. Bacula consoles work correctly *only* with UTF8.
15 #ENCODING="ENCODING 'UTF8'"
18 if $bindir/psql -f - -d template1 $* <<END-OF-DATA
19 CREATE DATABASE ${db_name} $ENCODING;
20 ALTER DATABASE ${db_name} SET datestyle TO 'ISO, YMD';
23 echo "Creation of ${db_name} database succeeded."
25 echo "Creation of ${db_name} database failed."