A live bird collage card for your Home Assistant dashboard.
Working on a new installation method
Patrick McGuired56ece61a67b
diff --git a/Birders_Guide_Installer.sh b/Birders_Guide_Installer.shindex eec2292d..b336f95d 100755--- a/Birders_Guide_Installer.sh+++ b/Birders_Guide_Installer.sh@@ -1,7 +1,7 @@#!/usr/bin/env bashset -emy_dir=${HOME}/BirdNET-Pi-branch=testing+branch=newinstallertrap '${my_dir}/scripts/dump_logs.sh && exit' EXIT SIGHUP SIGINT@@ -47,21 +47,6 @@ EOFcd ~curl -s -O "https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/${branch}/Birders_Guide_Installer.sh"chmod +x Birders_Guide_Installer.sh- cat << EOF | sudo tee /etc/systemd/user/birdnet-system-installer.service &> /dev/null-[Unit]-Description=A BirdNET-Pi Installation Script Service-After=graphical.target network-online.target--[Service]-Type=simple-Restart=on-failure-RestartSec=3s-ExecStart=lxterminal -e /home/pi/Birders_Guide_Installer.sh--[Install]-WantedBy=default.target-EOF- systemctl --user enable birdnet-system-installer.serviceechoecho "Stage 1 complete"touch ${HOME}/stage_1_complete@@ -119,10 +104,10 @@ stage_2() {echo "Follow the instructions to fill out the LATITUDE and LONGITUDE variablesand set the passwords for the live audio stream. Save the file after editingand then close the Mouse Pad editing window to continue."- if ( env | grep SSH_CONNECTION &> /dev/null );then- editor=nano- else+ if [ -z $SSH_CONNECTION ];theneditor=mousepad+ else+ editor=nanofi$editor ${my_dir}/Birders_Guide_Installer_Configuration.txtwhile pgrep $editor &> /dev/null;dodiff --git a/scripts/birdnet-pi-config b/scripts/birdnet-pi-configindex b6e5a9c3..bf62f53c 100755--- a/scripts/birdnet-pi-config+++ b/scripts/birdnet-pi-config@@ -5,7 +5,7 @@# See LICENSE file for copyright and license details# Copyright (c) 2012 Alex Bradbury <[email protected]>-my_dir=$(realpath $(dirname $0))+branch=newinstallerINTERACTIVE=TrueASK_TO_REBOOT=0BLACKLIST=/etc/modprobe.d/raspi-blacklist.conf@@ -718,7 +718,7 @@ do_update() {}do_install_birdnet() {- ${my_dir}/Birders_Guide_Installer.sh+ curl -s "https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/${branch}/Birders_Guide_Installer.sh" | bashASK_TO_REBOOT=1}diff --git a/scripts/uninstall.sh b/scripts/uninstall.shindex 9cd8ce50..c6033fcd 100755--- a/scripts/uninstall.sh+++ b/scripts/uninstall.sh@@ -1,7 +1,8 @@#!/usr/bin/env bash# Uninstall script to remove everything-# set -x # Uncomment to debug+#set -x # Uncomment to debugtrap 'rm -f ${TMPFILE}' EXIT+my_dir=/home/pi/BirdNET-Pi/scriptssource /etc/birdnet/birdnet.conf &> /dev/nullSCRIPTS=(birdnet_analysis.shbirdnet_recording.sh@@ -44,8 +45,8 @@ tmuxuninstall.shupdate_species.sh${HOME}/.gotty)--services=$(awk '/service/ && /systemctl/ && !/php/ {print $3}' ${my_dir}/install_services.sh | sort)+set -x+services=($(awk '/service/ && /systemctl/ && !/php/ {print $3}' ${my_dir}/install_services.sh | sort))remove_services() {for i in "${services[@]}"; do@@ -59,6 +60,7 @@ remove_services() {sudo rm -drf /etc/systemd/system/"${i}"fidone+ set +xremove_icecastremove_crons}