]> git.sur5r.net Git - bacula/bacula/blobdiff - 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
diff --git a/bacula/src/win32/cats/create_postgresql_database.cmd b/bacula/src/win32/cats/create_postgresql_database.cmd
new file mode 100644 (file)
index 0000000..90b029c
--- /dev/null
@@ -0,0 +1,23 @@
+@ECHO off\r
+REM\r
+REM  Script to create Bacula database(s)\r
+REM\r
+\r
+REM use SQL_ASCII to be able to put any filename into\r
+REM  the database even those created with unusual character sets\r
+SET ENCODING=ENCODING 'SQL_ASCII'\r
+\r
+REM use UTF8 if you are using standard Unix/Linux LANG specifications\r
+REM  that use UTF8 -- this is normally the default and *should* be\r
+REM  your standard.  Bacula consoles work correctly *only* with UTF8.\r
+REM SET ENCODING=ENCODING 'UTF8'\r
+\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\create_postgresql_database.sql" -d template1 %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Creation of bacula database succeeded.\r
+EXIT /b 0\r
+GOTO :EOF\r
+\r
+:ERROR\r
+ECHO Creation of bacula database failed.\r
+EXIT /b 1\r