HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/share/webmin/bacula-backup/fixaddr.cgi
#!/usr/bin/perl
# Update the host in bconsole.conf to match this system

require './bacula-backup-lib.pl';

&lock_file($bconsole_conf_file);
$conconf = &get_bconsole_config();
$condir = &find("Director", $conconf);
$addr = &get_system_hostname();
if (!&to_ipaddress($addr) && !&to_ip6address($addr)) {
	$addr = "localhost";
	}
&save_directive($conconf, $condir, "Address", $addr, 1);
&flush_file_lines();
&unlock_file($bconsole_conf_file);

&webmin_log("fixaddr");
&redirect("");