What are possible negative implications of using global variable in Webmin config files instead of real values?

When creating a new template from an existing Virtualmin server, we have to cleanup several values like, for example, the IP address in the following configuration files:


So instead of cleaning them IP I thought why not to use global variable. Anyway, I decided to test this by defining a system-wide global variable $IP which has a value of the current server, replaced all the occurrences of real IP address with the global variable in the above configuration files. Restarted webmin and browsed its UI and didn't notice any errors. So everything works just fine except that checking Virtualmin configuration gives the following notice:

Default IP address is set to $IP, but the detected external address is actually xx.xx.xx.xxx. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.

which is fine, we can live with it, provided of course, there are no real harm.

Could someone from *min team elaborate on possible negative implications of using a global variable instead of real values in Webmin's config files? Thanks a lot!

Closed (works as designed)


Assigned: Unassigned ยป

You can't use a literal $IP in those files - not all of them will get automatically substituted by Virtualmin.