mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-06 14:08:47 +02:00
Update 20-configuration.sh
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
# Where is the config
|
||||||
|
CONFIGSOURCE=$(bashio::config "PMM_CONFIG")
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Create folders #
|
# Create folders #
|
||||||
##################
|
##################
|
||||||
@@ -7,20 +10,17 @@
|
|||||||
PUID=$(bashio::config 'PUID')
|
PUID=$(bashio::config 'PUID')
|
||||||
GUID=$(bashio::config 'GUID')
|
GUID=$(bashio::config 'GUID')
|
||||||
|
|
||||||
if [ ! -d /config/addons_config/plex-meta-manager ]; then
|
if [ ! -d "$(dirname "${CONFIGSOURCE}")" ]; then
|
||||||
echo "Creating /config/addons_config/plex-meta-manager"
|
echo "Creating $(dirname ${CONFIGSOURCE})"
|
||||||
mkdir -p /config/addons_config/plex-meta-manager
|
mkdir -p "$(dirname "${CONFIGSOURCE}")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R "$PUID":"$GUID" /config/addons_config/plex-meta-manager
|
chown -R "$PUID":"$GUID" "$(dirname "${CONFIGSOURCE}")"
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Set config.yaml #
|
# Set config.yaml #
|
||||||
###################
|
###################
|
||||||
|
|
||||||
# Where is the config
|
|
||||||
CONFIGSOURCE=$(bashio::config "PMM_CONFIG")
|
|
||||||
|
|
||||||
# Check if config file is there, or create one from template
|
# Check if config file is there, or create one from template
|
||||||
if [ -f "$CONFIGSOURCE" ]; then
|
if [ -f "$CONFIGSOURCE" ]; then
|
||||||
bashio::log.info "Using config file found in $CONFIGSOURCE"
|
bashio::log.info "Using config file found in $CONFIGSOURCE"
|
||||||
|
|||||||
Reference in New Issue
Block a user