From ea918a0481cf48aeb6d1887a1ea4b5e2df3f57eb Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Wed, 6 Oct 2021 19:16:05 -0400 Subject: [PATCH] added edit_birdnet_conf.service to install_services.sh --- scripts/install_services.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/install_services.sh b/scripts/install_services.sh index cde71c1..1662c50 100755 --- a/scripts/install_services.sh +++ b/scripts/install_services.sh @@ -349,6 +349,25 @@ EOF chmod 0440 /etc/sudoers.d/010_caddy-nopasswd } +install_edit_birdnet_conf() { + cat << EOF > /etc/systemd/system/edit_birdnet_conf.service +[Unit] +Description=Edit birdnet.conf + +[Service] +Restart=on-failure +RestartSec=3 +Type=simple +User=pi +Environment=TERM=xterm-256color +ExecStart=/usr/local/bin/gotty -w -p 9898 --title-format "Edit birdnet.conf" tmux new -A -s editbirdnet nano /home/pi/BirdNET-Lite/birdnet.conf + +[Install] +WantedBy=multi-user.target +EOF +} + + install_icecast() { if ! which icecast2;then echo "Installing IceCast2" @@ -457,6 +476,7 @@ install_selected_services() { install_gotty_logs install_tmux install_php + install_edit_birdnet_conf.service fi if [ ! -z "${ICE_PWD}" ];then