#!/bin/sh
#
# This routine makes the appropriately configured
#  Bacula tables for PostgreSQL or MySQL.
# SQLite does not have permissions.
#
if test xmysql = xsqlite3 ; then 
  echo "Granting MySQL privileges"
  /usr/local/libexec/bacula/grant_mysql_privileges $*
else
  if test xpostgresql = xsqlite3 ; then 
    echo "Granting PostgreSQL privileges"
    /usr/local/libexec/bacula/grant_postgresql_privileges $*
  elif test xingres = xsqlite3 ; then
    echo "Granting Ingres privileges"
    /usr/local/libexec/bacula/grant_ingres_privileges $*
  else
    if test xsqlite3 = xsqlite3 ; then 
      echo "Granting SQLite privileges"
      /usr/local/libexec/bacula/grant_sqlite3_privileges $*
    fi
  fi
fi
