Update 20-config

This commit is contained in:
Alexandre
2021-10-31 00:09:50 +02:00
committed by GitHub
parent 0641b9a593
commit 0871afe7e3

View File

@@ -86,6 +86,7 @@ bashio::log.info "UI selected : $CUSTOMUI"
# From linuxserver #
####################
if bashio::config.has_value 'user'; then
USER=$(bashio::config 'user')
PASS=$(bashio::config 'pass')
if [ ! -z "$USER" ] && [ ! -z "$PASS" ]; then
@@ -97,7 +98,9 @@ else
sed -i "/rpc-username/c\ \"rpc-username\": \"$USER\"," /config/transmission/settings.json
sed -i "/rpc-password/c\ \"rpc-password\": \"$PASS\"," /config/transmission/settings.json
fi
fi
if bashio::config.has_value 'whitelist'; then
WHITELIST=$(bashio::config 'whitelist')
if [ ! -z "$WHITELIST" ]; then
sed -i '/rpc-whitelist-enabled/c\ "rpc-whitelist-enabled": true,' /config/transmission/settings.json
@@ -106,6 +109,7 @@ else
sed -i '/rpc-whitelist-enabled/c\ "rpc-whitelist-enabled": false,' /config/transmission/settings.json
sed -i "/\"rpc-whitelist\"/c\ \"rpc-whitelist\": \"$WHITELIST\"," /config/transmission/settings.json
fi
fi
#if [ ! -z "$HOST_WHITELIST" ]; then
# sed -i '/rpc-host-whitelist-enabled/c\ "rpc-host-whitelist-enabled": true,' /config/transmission/settings.json