mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Improve birdnet.conf source
This commit is contained in:
@@ -13,7 +13,7 @@ touch "$HOME/BirdSongs/StreamData/analyzing_now.txt"
|
|||||||
|
|
||||||
# Read configuration
|
# Read configuration
|
||||||
set -u
|
set -u
|
||||||
source /config/birdnet.conf 2>/dev/null
|
source /etc/birdnet/birdnet.conf
|
||||||
set +u
|
set +u
|
||||||
|
|
||||||
# Set constants
|
# Set constants
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# Get values
|
# Get values
|
||||||
|
set -u
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
|
set +u
|
||||||
|
|
||||||
# Create ingress configuration for Caddyfile
|
# Create ingress configuration for Caddyfile
|
||||||
cat << EOF >> /etc/caddy/Caddyfile
|
cat << EOF >> /etc/caddy/Caddyfile
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Performs the recording from the specified RTSP stream or soundcard
|
# Performs the recording from the specified RTSP stream or soundcard
|
||||||
|
set -u
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
|
set +u
|
||||||
|
|
||||||
# Read the logging level from the configuration option
|
# Read the logging level from the configuration option
|
||||||
LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}"
|
LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}"
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
# Adapted from https://github.com/mcguirepr89/BirdNET-Pi/issues/393#issuecomment-1166445710
|
# Adapted from https://github.com/mcguirepr89/BirdNET-Pi/issues/393#issuecomment-1166445710
|
||||||
|
|
||||||
# Define logging functions
|
# Define logging functions
|
||||||
log_green() { echo -e "\033[32m$1\033[0m" }
|
log_green() { echo -e "\033[32m$1\033[0m"; }
|
||||||
log_red() { echo -e "\033[31m$1\033[0m" }
|
log_red() { echo -e "\033[31m$1\033[0m"; }
|
||||||
log_yellow() { echo -e "\033[33m$1\033[0m" }
|
log_yellow() { echo -e "\033[33m$1\033[0m"; }
|
||||||
log_info() { echo -e "\033[34m$1\033[0m" }
|
log_info() { echo -e "\033[34m$1\033[0m"; }
|
||||||
|
|
||||||
echo "$(log_green "Starting service: throttlerecording")"
|
echo "$(log_green "Starting service: throttlerecording")"
|
||||||
touch "$HOME/BirdSongs/StreamData/analyzing_now.txt"
|
touch "$HOME/BirdSongs/StreamData/analyzing_now.txt"
|
||||||
|
|
||||||
# Read configuration
|
# Read configuration
|
||||||
set -u
|
set -u
|
||||||
source /config/birdnet.conf 2>/dev/null
|
source /etc/birdnet/birdnet.conf
|
||||||
set +u
|
set +u
|
||||||
|
|
||||||
# Set constants
|
# Set constants
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# Get values
|
# Get values
|
||||||
|
set -u
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
|
set +u
|
||||||
|
|
||||||
# Create ingress configuration for Caddyfile
|
# Create ingress configuration for Caddyfile
|
||||||
cat << EOF >> /etc/caddy/Caddyfile
|
cat << EOF >> /etc/caddy/Caddyfile
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Performs the recording from the specified RTSP stream or soundcard
|
# Performs the recording from the specified RTSP stream or soundcard
|
||||||
|
set -u
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
|
set +u
|
||||||
|
|
||||||
# Read the logging level from the configuration option
|
# Read the logging level from the configuration option
|
||||||
LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}"
|
LOGGING_LEVEL="${LogLevel_BirdnetRecordingService}"
|
||||||
|
|||||||
Reference in New Issue
Block a user