Handle hostnames with upper-case letters
[webmin.git] / bacula-backup / fixpass.cgi
1 #!/usr/local/bin/perl
2 # Update the password in bconsole.conf to match bacula-dir.conf
3
4 require './bacula-backup-lib.pl';
5
6 &lock_file($bconsole_conf_file);
7 $dirconf = &get_director_config();
8 $dirdir = &find("Director", $dirconf);
9 $conconf = &get_bconsole_config();
10 $condir = &find("Director", $conconf);
11 $dirpass = &find_value("Password", $dirdir->{'members'});
12 &save_directive($conconf, $condir, "Password", $dirpass, 1);
13 &flush_file_lines();
14 &unlock_file($bconsole_conf_file);
15
16 &webmin_log("fixpass");
17 &redirect("");
18