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