Skip to content

A live bird collage card for your Home Assistant dashboard.

properly configure /etc/hosts

Patrick McGuire62076d83ae1c
diff --git a/scripts/install_services.sh b/scripts/install_services.sh
index 7e8b3e24..da9e7974 100755
--- a/scripts/install_services.sh
+++ b/scripts/install_services.sh
@@ -16,6 +16,7 @@ set_hostname() {
echo "Setting hostname to 'birdnetpi'"
hostnamectl set-hostname birdnetpi
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
+ sed -i 's/localhost$/localhost birdnetpi.local/g' /etc/hosts
fi
}
diff --git a/scripts/update_services.sh b/scripts/update_services.sh
index caf8e323..1d33862c 100755
--- a/scripts/update_services.sh
+++ b/scripts/update_services.sh
@@ -16,6 +16,7 @@ set_hostname() {
echo "Setting hostname to 'birdnetpi'"
hostnamectl set-hostname birdnetpi
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
+ sed -i 's/localhost$/localhost birdnetpi.local/g' /etc/hosts
fi
}