Informations
If a VPS has already been deleted and you recreate it, the module assigns a new IP by default. The behavior can be changed via the customconfig.php file, so that the module uses the IP stored in the "Dedicated IP" field when creating the server.
If the IP is already in use, an error message will be displayed. Then you can either adjust the IP, or empty the box to let the module select an IP.
This option can also be used to build in your own IP selection mechanism. You can use the hook "hook_before_create" to deposit an IP in the product via SQL.
How to activate "Reuse VPS IP on Create"
The feature can be activated via the customconfig.php file, which is located at /modules/servers/dedicated/
- Navigate into the directory
/modules/servers/dedicated/
- Open the file customconfig.php, or create the file if it does not exist
Insert following line and save the file:
$vps_reuse_ip_from_dedicatedip_field = 1;
If the file was newly created, you need to add a PHP tag at the beginning:
<?php $vps_reuse_ip_from_dedicatedip_field = 1;
After the option has been set, the module will reuse the IP address.