give mysql password dump to pac-admin

This commit is contained in:
Peter Hormanns 2013-06-18 16:20:49 +02:00
parent ce55f33d79
commit 84907fcd2c

View File

@ -32,7 +32,8 @@ function shadowdump(pac) {
function mysqlaclsdump(pac) {
var dump = "/home/pacs/" + pac + "/.bak/mysql_passwd";
var cmd = "mysqldump --no-create-db --skip-opt --no-create-info --replace --where=\"user like '" + pac + "%'\" mysql --tables user > " + dump
+ " && mysqldump --no-create-db --skip-opt --no-create-info --replace --where=\"db like '" + pac + "%'\" mysql --tables db tables_priv proc >>" + dump;
+ " && mysqldump --no-create-db --skip-opt --no-create-info --replace --where=\"db like '" + pac + "%'\" mysql --tables db tables_priv proc >>" + dump
+ " && chown " + pac + ":" + pac + " " + dump;
runbash(cmd);
}
function pgsqlpasswddump(pac) {