Detect and add new IP addresses to ISPConfig
Summary
On the very first and only the very first install of ISPConfig, the installer will detect and add the IP addresses of the server. After installing ISPConfig, I have added additional IP addresses to the server. After recently updating ISPConfig to the latest version, my new IP addresses were not added to ISPConfig. ISPConfig should be able to scan for new IP addresses and add them to ISPConfig. This single feature should be available from at least three places. Additionally, I think you should be asked whether you want to scan for server IP addresses to add when installing and updating ISPConfig. Currently, the installer forces you to add the new IP addresses whether you want to or not.
First, the feature should be fixed in the file /install/install.php, directly above the Restarting services section. Second, the feature should be added to the file /install/update.php, directly above the Restarting services section. Third, the feature should be added to the ISPConfig admin interface, under System->Server IP Addresses, with a new button labeled "Detect and Add New IPs."
Proposed fix
I think I can fix this by changing or implementing the following code in the /install/install.php and /install/update.php files:
// Detect and add server IP addresses to ISPconfig
$detect_ips_answer = $inst->simple_query('Detect and add server IPs to ISPConfig?', array('yes', 'no'), 'no','detect_ips');
if($detect_ips_answer == 'yes') {
swriteln('Detecting IP addresses');
$inst->detect_ips();
}
I think the field server_ip.ip_address should be changed to unique to prevent duplicate entries.
Perhaps in time, I can offer more information for the button in the admin interface. Maybe someone else can push a commit for the button before I can get to it.
Environment
ISPConfig 3.2.11p2 Debian 11
Related log entries
issue-fix-detect-ips-on-install issue-add-detect-ips-on-update issue-add-detect-ips-sysadmin-button