mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-01 19:48:47 +02:00
Update 00-folders.sh
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# 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
|
# Adapt files
|
||||||
CONFIGLOCATION="$(dirname "$CONFIGLOCATION")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "s|/data/config|$CONFIGLOCATION|g" /etc/cont-init.d/*
|
sed -i "s|/data/config|$CONFIGLOCATION|g" /etc/cont-init.d/*
|
||||||
sed -i "s|/data/config|$CONFIGLOCATION|g" /defaults/*
|
|
||||||
|
|
||||||
# Create directory
|
# Create directory
|
||||||
mkdir -p "$CONFIGLOCATION"/config
|
mkdir -p "$CONFIGLOCATION"/config
|
||||||
|
|||||||
Reference in New Issue
Block a user