mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-21 00:01:50 +02:00
Update 20-transmission-configuration.sh
This commit is contained in:
@@ -36,10 +36,16 @@ download_dir=$(bashio::config 'download_dir')
|
|||||||
incomplete_dir=$(bashio::config 'incomplete_dir')
|
incomplete_dir=$(bashio::config 'incomplete_dir')
|
||||||
CONFIG=$(</config/transmission/settings.json)
|
CONFIG=$(</config/transmission/settings.json)
|
||||||
|
|
||||||
|
# Permissions
|
||||||
|
mkdir -p $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
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=true")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=true")
|
||||||
|
mkdir -p $incomplete_dir
|
||||||
|
chown abc:abc $incomplete_dir
|
||||||
else
|
else
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=false")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=false")
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user