Set hostname as apps domain if `dig` is not available
Always use hostname as default apps domain, regardless of DNS

If somebody's set up the server with a non-routable hostname,
there's no foul in using it by default. Maybe the user has an
entry in /etc/hosts? Maybe they're discovering the name via an
alternative mechanism such as SMB?

If they're going to use an alternative domain, they're going to
have to configure it anyway, and if they don't want a default
app domain, they shouldn't have this plugin installed in the
first place.