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