From b6b376b06b81caec2c8be02a4407fa6035805cce Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:03:11 +0100 Subject: [PATCH] Ensure minimal structure --- birdnet-pi/rootfs/etc/cont-init.d/99-run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh b/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh index 2670fc34c..2f7c516c5 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/99-run.sh @@ -13,15 +13,15 @@ fi # SET SYSTEM # ############## +# Set password bashio::log.info "Setting password for the user pi" if bashio::config.has_value "pi_password"; then echo "pi:$(bashio::config "pi_password")" | chpasswd fi bashio::log.info "Password set successfully for user pi." -bashio::log.info "Setting timezone :" - # Use timezone defined in add-on options if available +bashio::log.info "Setting timezone :" if bashio::config.has_value 'TZ'; then TZ_VALUE="$(bashio::config 'TZ')" if timedatectl set-timezone "$TZ_VALUE"; then @@ -49,6 +49,10 @@ else fi fi +# Ensure minimal structure +mkdir -p "$HOME"/BirdSongs/StreamData +touch "$HOME"/BirdSongs/StreamData/analyzing_now.txt + bashio::log.info "Starting system services" bashio::log.info "Starting cron service"