]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/create_ingres_database.in
Fix #1648 about make_catalog_backup.pl with multiple catalog
[bacula/bacula] / bacula / src / cats / create_ingres_database.in
1 #!/bin/sh
2 #
3 # shell script to create Bacula database(s)
4 #
5
6 bindir=@SQL_BINDIR@
7 PATH="$bindir:$PATH"
8 db_name=${db_name:-@db_name@}
9 db_user=${db_user:-@db_user@}
10
11 # use SQL_ASCII to be able to put any filename into
12 #  the database even those created with unusual character sets
13 ENCODING="ENCODING 'SQL_ASCII'"
14  
15 # use UTF8 if you are using standard Unix/Linux LANG specifications
16 #  that use UTF8 -- this is normally the default and *should* be
17 #  your standard.  Bacula works correctly *only* with correct UTF8.
18 #
19 #  Note, with this encoding, if you have any "weird" filenames on
20 #  your system (names generated from Win32 or Mac OS), you may
21 #  get Bacula batch insert failures.
22 #
23 #ENCODING="ENCODING 'UTF8'"
24      
25 if createdb -u${db_user} $* ${db_name}
26 then
27    echo "Creation of ${db_name} database succeeded."
28 else
29    echo "Creation of ${db_name} database failed."
30 fi
31
32 exit 0