1@ECHO off
2REM
3REM  Script to create Bacula database(s)
4REM
5
6REM use SQL_ASCII to be able to put any filename into
7REM  the database even those created with unusual character sets
8SET ENCODING=ENCODING 'SQL_ASCII'
9
10REM use UTF8 if you are using standard Unix/Linux LANG specifications
11REM  that use UTF8 -- this is normally the default and *should* be
12REM  your standard.  Bacula consoles work correctly *only* with UTF8.
13REM SET ENCODING=ENCODING 'UTF8'
14
15"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\create_postgresql_database.sql" -d template1 %*
16IF ERRORLEVEL 1 GOTO :ERROR
17ECHO Creation of bacula database succeeded.
18EXIT /b 0
19GOTO :EOF
20
21:ERROR
22ECHO Creation of bacula database failed.
23EXIT /b 1
24