I previously posted this on the GitHub issue tracker which has now been removed (including my post), so I’m posting it here again.
On a Debian GNU/Linux 9.0 “stretch” VM runing in a KVM environment, the output of the ipconfig command does not return a string containing a pattern such as
As a result, discourse-setup sets the IP variable to an empty string and the installation fails with
mydomain.net does not appear to resolve to .
A better approach would be to use something similar to
ip -f inet addr show $IFACE | grep -Po 'inet \K[\d.]+' | head -n1