Ability to skip adding an IP to the network device (SKINS)(LANG)

Version 1.53


In some cases you might want to manage the adding of IPs to your device yourself. In these cases, DA shouldn't attempt to add the IP to the device. A new option at: Admin Level -> IP Manager -> Add IP now shows a checkbox for "Add to device". If you add an IP with this option un-checked, the IP will not be added to the network device, but will be added to the configs for use. If you don't add the IP to the device on your own, services (nginx) will fail to start, since they require IPs in the configs to be working in the device. ============================ CONFIG /usr/local/directadmin/data/admin/ips/ if the option is un-checked, then the following will be added to the above ip config: add_to_device=no so that upon reboot, the startips script (which calls the addip) will skip the adding of this ip. ============================ SCRIPT /usr/local/directadmin/scripts/addip this script has a check for add_to_device=no in the ip config, so if set, a zero exit code is returned with echo: IP $1 has add_to_device=no set. Skipping ============================ SKINS admin/ip_manager.html add this, which lets DA know the option is in play: <input type=hidden name='add_to_device_aware' value='yes'> If you do not post add_to_device_aware=yes, then it will be assumed to always add to the device. And the actual option: <input type=checkbox name='add_to_device' value='yes' checked> ============================ API / POSTING Always pass this to use the option: add_to_device_aware=yes and: add_to_device=yes or: add_to_device=no or: no add_to_device at all (which is what a checkbox does when unchecked, hence the need for "Aware" option, above) can be used with CMD_API_IP_MANAGER ============================ LANG lang/en/admin/ip_manager.html LANG_ADD_TO_DEVICE=Add to device LANG_ADD_TO_DEVICE_TITLE=Add IP to configs, but never to network device

Interested to try DirectAdmin? Get a 30-day Free Trial!