mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-12 16:10:41 +01:00
Expose settings
This commit is contained in:
@@ -7,14 +7,14 @@ declare username
|
||||
declare password
|
||||
|
||||
if ! bashio::fs.directory_exists '/data/transmission'; then
|
||||
mkdir '/data/transmission'
|
||||
mkdir '/share/transmission'
|
||||
fi
|
||||
|
||||
if ! bashio::fs.file_exists '/data/transmission/settings.json'; then
|
||||
echo "{}" > /data/transmission/settings.json
|
||||
if ! bashio::fs.file_exists '/share/transmission/settings.json'; then
|
||||
echo "{}" > /share/transmission/settings.json
|
||||
fi
|
||||
|
||||
CONFIG=$(</data/transmission/settings.json)
|
||||
CONFIG=$(</share/transmission/settings.json)
|
||||
|
||||
# Defaults
|
||||
CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir\"=\"/share/incomplete\"")
|
||||
@@ -35,4 +35,4 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-username\"=\"${username}\"")
|
||||
password=$(bashio::config '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