Ensure minimal structure

This commit is contained in:
Alexandre
2025-03-02 23:03:11 +01:00
committed by GitHub
parent 58b5e9e5f0
commit b6b376b06b

View File

@@ -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"