what's the simpliest way to edit IP address of server in ISPConfig database? I want to deploy virtual servers with ISPConfig but it does not refresh its IP address in ISPConfig. How to achieve it? I can use cloud-init, so maybe some shell script updating MySQL DB which will be initialized by cloud-init?
What is this IP address from ISPConfig DB used for? Is it neccessary to update it?
Running this after first boot does the thing:
ip4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f 1)
mysql -u root --password=$dbpass -D dbispconfig -e "UPDATE server_ip SET ip_address='$ip4' WHERE ip_type='IPv4';"