mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-19 13:59:15 +02:00
Update and rename 20-config to 19-config
This commit is contained in:
@@ -20,12 +20,13 @@ declare incomplete_dir
|
|||||||
# PERMISSIONS #
|
# PERMISSIONS #
|
||||||
###############
|
###############
|
||||||
#Default folders
|
#Default folders
|
||||||
|
echo "Updating folders"
|
||||||
mkdir -p /config/transmission
|
mkdir -p /config/transmission
|
||||||
chown -R abc:abc /config/transmission
|
chown -R abc:abc /config/transmission
|
||||||
chown -R abc:abc /data
|
chown -R abc:abc /data
|
||||||
|
|
||||||
if ! bashio::fs.file_exists '/config/transmission/settings.json'; then
|
if ! bashio::fs.file_exists '/config/transmission/settings.json'; then
|
||||||
|
echo "Creating default config"
|
||||||
cp "/defaults/settings.json" "/config/transmission/settings.json"
|
cp "/defaults/settings.json" "/config/transmission/settings.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -42,12 +43,13 @@ mkdir -p $download_dir || true
|
|||||||
chown abc:abc $download_dir || true
|
chown abc:abc $download_dir || true
|
||||||
|
|
||||||
# if incomplete dir > 2, to allow both null and '', set it as existing
|
# if incomplete dir > 2, to allow both null and '', set it as existing
|
||||||
if [ ${#incomplete_dir} -ge 2 ]
|
if [ ${#incomplete_dir} -ge 2 ]; then
|
||||||
then
|
echo "Incomplete dir set: $incomplete_dir"
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=true")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=true")
|
||||||
mkdir -p $incomplete_dir
|
mkdir -p $incomplete_dir
|
||||||
chown abc:abc $incomplete_dir
|
chown abc:abc $incomplete_dir
|
||||||
else
|
else
|
||||||
|
echo "Incomplete dir disabled"
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=false")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=false")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -66,7 +68,8 @@ echo "${CONFIG}" > /config/transmission/settings.json
|
|||||||
|
|
||||||
if bashio::config.has_value 'customUI'; then
|
if bashio::config.has_value 'customUI'; then
|
||||||
### Variables
|
### Variables
|
||||||
|
echo "Setting custom UI"
|
||||||
CUSTOMUI=$(bashio::config 'customUI')
|
CUSTOMUI=$(bashio::config 'customUI')
|
||||||
export TRANSMISSION_WEB_HOME=/$CUSTOMUI/
|
export TRANSMISSION_WEB_HOME=/$CUSTOMUI/
|
||||||
bashio::log.info "UK selected : $TRANSMISSION_WEB_HOME"
|
bashio::log.info "UI selected : $TRANSMISSION_WEB_HOME"
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user