#!/bin/sh # # shell script to create Bacula database(s) # bindir=@SQL_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} db_user=${db_user:-@db_user@} # 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 createdb -u${db_user} $* ${db_name} then echo "Creation of ${db_name} database succeeded." else echo "Creation of ${db_name} database failed." fi exit 0