Update 02-restorestreamdata.sh

This commit is contained in:
Alexandre
2024-10-27 22:38:41 +01:00
committed by GitHub
parent 9e23dea6b1
commit 4f2f869867

View File

@@ -3,11 +3,11 @@
set -e
if [ -d /data/StreamData ]; then
bashio::log.fatal "Container was stopped while files were still being analyzed."
# Check if there are .wav files in /data/StreamData
if find /data/StreamData -type f -name "*.wav" | grep -q .; then
bashio::log.warning "Restoring .wav files from /data/StreamData to $HOME/BirdSongs/StreamData."
bashio::log.warning "Container was stopped while files were still being analyzed."
echo "... restoring .wav files from /data/StreamData to $HOME/BirdSongs/StreamData."
# Create the destination directory if it does not exist
mkdir -p "$HOME"/BirdSongs/StreamData