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