From 886b7efb30d09baafd197e387a806bdd4df44abf Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Sun, 6 Feb 2022 14:20:37 -0500 Subject: [PATCH] Add "Install Complete" Message (#190) * Add install complete message * Get interface ip --- homeassistant-supervised/DEBIAN/postinst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index 24d5670..cab2d94 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -34,6 +34,10 @@ while ! ping -c 1 -W 1 ${URL_VERSION_HOST}; do sleep 2 done +# Get primary network interface +PRIMARY_INTERFACE=$(ip route | awk '/^default/ { print $5 }') +IP_ADDRESS=$(ip -4 addr show dev "$PRIMARY_INTERFACE" | awk '/inet / { sub("/.*", "", $2); print $2 }') + case $ARCH in "i386" | "i686") MACHINE=${MACHINE:=qemux86} @@ -127,3 +131,7 @@ systemctl start hassio-supervisor.service info "Installing the 'ha' cli" chmod a+x "${PREFIX}/bin/ha" + +info "Within a few minutes you will be able to reach Home Assistant at:" +info "http://homeassistant.local:8123 or using the IP address of your" +info "machine: http://${IP_ADDRESS}:8123" \ No newline at end of file