]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/grant_mysql_privileges.in
Doc + DB script updates
[bacula/bacula] / bacula / src / cats / grant_mysql_privileges.in
index 0c0c6a597b721beff32a04e858dbb1761471a8df..a95021e7199459f88685f7ef892d75a70130ce10 100644 (file)
@@ -2,17 +2,18 @@
 #
 # shell script to grant privileges to the bacula database
 #
+USER=bacula
 bindir=@SQL_BINDIR@
 
 if $bindir/mysql $* -u root -f <<END-OF-DATA
 use mysql
-grant all privileges on bacula.* to bacula@localhost with grant option;
-grant all privileges on bacula.* to bacula@"%" with grant option;
+grant all privileges on bacula.* to ${USER}@localhost with grant option;
+grant all privileges on bacula.* to ${USER}@"%" with grant option;
 select * from user;
 flush privileges;
 END-OF-DATA
 then
-   echo "Privileges for bacula granted."
+   echo "Privileges for ${USER} granted."
    exit 0
 else
    echo "Error creating privileges."