Update 20-configuration.sh

This commit is contained in:
Alexandre
2022-02-07 10:25:01 +01:00
committed by GitHub
parent ab1a40a168
commit 57630fb7db

View File

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