From 2d62dbd239f77e18d9616b59ff4d94d1eea61442 Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:02:34 -0400 Subject: [PATCH] Update update_services.sh --- scripts/update_services.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/update_services.sh b/scripts/update_services.sh index 15d2cfa..5aa37ac 100755 --- a/scripts/update_services.sh +++ b/scripts/update_services.sh @@ -11,6 +11,14 @@ nomachine_url="https://download.nomachine.com/download/7.6/Arm/nomachine_7.6.2_3 gotty_url="https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_arm.tar.gz" config_file="$(dirname ${my_dir})/birdnet.conf" +set_hostname() { + if [ "$(hostname)" != "birdnetpi" ];then + echo "Setting hostname to 'birdnetpi'" + hostnamectl set-hostname birdnetpi + sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts + fi +} + install_scripts() { echo "Installing BirdNET-Pi scripts to /usr/local/bin" ln -sf ${my_dir}/* /usr/local/bin/ @@ -417,6 +425,7 @@ install_cleanup_cron() { } install_selected_services() { + set_hostname install_scripts install_birdnet_analysis