mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-04 00:01:36 +01:00
Update 00-folders.sh
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
CONFIGLOCATION=$(bashio::config "CONFIG_LOCATION")
|
||||
# Config location
|
||||
CONFIGLOCATION="$(bashio::config 'CONFIG_LOCATION')"
|
||||
|
||||
# Text
|
||||
bashio::log.info "Setting config location to $CONFIGLOCATION"
|
||||
|
||||
if [ ! -d "$CONFIGLOCATION" ]; then
|
||||
CONFIGLOCATION="$(dirname "$CONFIGLOCATION")"
|
||||
fi
|
||||
|
||||
# Adapt files
|
||||
sed -i "s|/data/config|$CONFIGLOCATION|g" /etc/cont-init.d/*
|
||||
sed -i "s|/data/config|$CONFIGLOCATION|g" /defaults/*
|
||||
|
||||
# Create directory
|
||||
mkdir -p "$CONFIGLOCATION"/config
|
||||
|
||||
Reference in New Issue
Block a user