]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/grant_bacula_privileges.in
Cleanup, change FROM order
[bacula/bacula] / bacula / src / cats / grant_bacula_privileges.in
index 6fdb1b12b1814d476c66487f9307555d0e8c8ded..5e9f4e735f1d985f5f66e7fb42f7b47a15e09be5 100755 (executable)
@@ -4,11 +4,17 @@
 #  Bacula tables for PostgreSQL or MySQL.
 # SQLite does not have permissions.
 #
-if test xmysql = x@DB_NAME@ ; then 
+if test xmysql = x@DB_TYPE@ ; then 
   echo "Granting MySQL privileges"
-  . ./grant_mysql_privileges
+  @scriptdir@/grant_mysql_privileges $*
 else
-  echo "Granting PostgreSQL privileges"
-  # hard coded database name
-  . ./grant_postgresql_privileges bacula
+  if test xpostgresql = x@DB_TYPE@ ; then 
+    echo "Granting PostgreSQL privileges"
+    @scriptdir@/grant_postgresql_privileges $*
+  else
+    if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then 
+      echo "Granting SQLite privileges"
+      @scriptdir@/grant_@DB_TYPE@_privileges $*
+    fi
+  fi
 fi