mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update 20-folders.sh
This commit is contained in:
@@ -3,6 +3,21 @@
|
||||
|
||||
LOCATION=$(bashio::config 'data_location')
|
||||
|
||||
# Check if config is located in an acceptable location
|
||||
LOCATIONOK=""
|
||||
for location in "/share" "/config" "/data" "/mnt"; do
|
||||
if [[ "$LOCATION" == "$location"* ]]; then
|
||||
LOCATIONOK=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$LOCATIONOK" ]; then
|
||||
LOCATION=/config/addons_config/${HOSTNAME#*-}
|
||||
bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION"
|
||||
fi
|
||||
|
||||
# Set folders
|
||||
|
||||
if [ ! -d /jellyfin ]; then
|
||||
echo "Creating /jellyfin"
|
||||
mkdir -p /jellyfin
|
||||
|
||||
Reference in New Issue
Block a user