mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 12:54:04 +02:00
Expose settings
This commit is contained in:
@@ -7,14 +7,14 @@ declare username
|
|||||||
declare password
|
declare password
|
||||||
|
|
||||||
if ! bashio::fs.directory_exists '/data/transmission'; then
|
if ! bashio::fs.directory_exists '/data/transmission'; then
|
||||||
mkdir '/data/transmission'
|
mkdir '/share/transmission'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! bashio::fs.file_exists '/data/transmission/settings.json'; then
|
if ! bashio::fs.file_exists '/share/transmission/settings.json'; then
|
||||||
echo "{}" > /data/transmission/settings.json
|
echo "{}" > /share/transmission/settings.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CONFIG=$(</data/transmission/settings.json)
|
CONFIG=$(</share/transmission/settings.json)
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir\"=\"/share/incomplete\"")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir\"=\"/share/incomplete\"")
|
||||||
@@ -35,4 +35,4 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-username\"=\"${username}\"")
|
|||||||
password=$(bashio::config 'password')
|
password=$(bashio::config 'password')
|
||||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-password\"=\"${password}\"")
|
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-password\"=\"${password}\"")
|
||||||
|
|
||||||
echo "${CONFIG}" > /data/transmission/settings.json
|
echo "${CONFIG}" > /share/transmission/settings.json
|
||||||
|
|||||||
Reference in New Issue
Block a user