chmod +x scripts

This commit is contained in:
Alexandre
2022-06-15 20:44:11 +02:00
parent 0047e2489f
commit 3351e5b29c
218 changed files with 0 additions and 9448 deletions

View File

@@ -1,31 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Where is the config
CONFIGSOURCE=$(bashio::config "PMM_CONFIG")
##################
# Create folders #
##################
PUID=$(bashio::config 'PUID')
PGID=$(bashio::config 'PGID')
if [ ! -d "$(dirname "${CONFIGSOURCE}")" ]; then
echo "Creating $(dirname "${CONFIGSOURCE}")"
mkdir -p "$(dirname "${CONFIGSOURCE}")"
fi
chown -R "$PUID":"$PGID" "$(dirname "${CONFIGSOURCE}")"
###################
# Set config.yaml #
###################
# Check if config file is there, or create one from template
if [ -f "$CONFIGSOURCE" ]; then
bashio::log.info "Using config file found in $CONFIGSOURCE"
else
cp /templates/config.yml "$(dirname "${CONFIGSOURCE}")"
bashio::log.warning "No config file, creating one from template. Please correct the config.yml file before restarting the addon !"
fi