From 233646c6cbec6d2630cb1d8755815c3cf452fe60 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 8 Apr 2017 16:43:41 -0600 Subject: [PATCH] Update finish.sh --- freebsd/resources/finish.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freebsd/resources/finish.sh b/freebsd/resources/finish.sh index 18d0c6f..3589d04 100755 --- a/freebsd/resources/finish.sh +++ b/freebsd/resources/finish.sh @@ -35,8 +35,11 @@ cd /usr/local/www/fusionpbx && php /usr/local/www/fusionpbx/core/upgrade/upgrade #get the server hostname #domain_name=$(hostname -f) -#get the interface name +#get the primary interface name interface_name=$(ifconfig -l | awk '{print $1}') +if [ .$interface_name = .'lo0' ]; then + interface_name=$(ifconfig -l | awk '{print $2}') +fi #get the ip address domain_name=$(ifconfig $interface_name | grep 'inet ' | awk '{print $2}')