2 # Update the Storage section
4 require './bacula-backup-lib.pl';
6 &error_setup($text{'storagec_err'});
8 $conf = &get_storage_config();
9 $storagec = &find("Storage", $conf);
10 $storagec || &error($text{'storagec_enone'});
11 $mems = $storagec->{'members'};
12 &lock_file($storagec->{'file'});
14 # Validate and store inputs
15 $in{'name'} =~ /^[a-z0-9\.\-\_]+$/ || &error($text{'storagec_ename'});
16 &save_directive($conf, $storagec, "Name", $in{'name'}, 1);
18 $in{'port'} =~ /^\d+$/ && $in{'port'} > 0 && $in{'port'} < 65536 ||
19 &error($text{'storagec_eport'});
20 &save_directive($conf, $storagec, "SDport", $in{'port'}, 1);
22 $in{'jobs'} =~ /^\d+$/ || &error($text{'storagec_ejobs'});
23 &save_directive($conf, $storagec, "Maximum Concurrent Jobs", $in{'jobs'}, 1);
25 -d $in{'dir'} || &error($text{'storagec_edir'});
26 &save_directive($conf, $storagec, "WorkingDirectory", $in{'dir'}, 1);
28 # Validate and store TLS inputs
29 &parse_tls_directives($conf, $storagec, 1);
32 &unlock_file($storagec->{'file'});
33 &auto_apply_configuration();
34 &webmin_log("storagec");