battybirdnet-pi

This commit is contained in:
Alexandre
2024-07-25 09:09:09 +02:00
parent b78d051a15
commit 8c7da1f224
43 changed files with 8873 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
if [ -d "$HOME"/BirdSongs/StreamData ]; then
bashio::log.fatal "Container stopping, saving temporary files"
# Stop the services in parallel
systemctl stop birdnet_analysis &
systemctl stop birdnet_recording
# Check if there are files in StreamData and move them to /data/StreamData
mkdir -p /data/StreamData
if [ "$(ls -A "$HOME"/BirdSongs/StreamData)" ]; then
mv -v "$HOME"/BirdSongs/StreamData/* /data/StreamData/
fi
bashio::log.fatal "... files safe, allowing container to stop"
fi