mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 03:14:04 +02:00
Allow disabling whitelist
https://github.com/alexbelgium/hassio-addons/issues/645#issuecomment-1385843356
This commit is contained in:
@@ -108,13 +108,18 @@ fi
|
|||||||
################
|
################
|
||||||
|
|
||||||
cd "$CONFIG_LOCATION"/ || true
|
cd "$CONFIG_LOCATION"/ || true
|
||||||
if bashio::config.has_value 'whitelist'; then
|
|
||||||
WHITELIST=$(bashio::config 'whitelist')
|
WHITELIST=$(bashio::config 'whitelist')
|
||||||
#clean data
|
#clean data
|
||||||
sed -i '/AuthSubnetWhitelist/d' qBittorrent.conf
|
sed -i '/AuthSubnetWhitelist/d' qBittorrent.conf
|
||||||
|
|
||||||
|
if [[ ${#WHITELIST} -gt 5 ]]; then
|
||||||
sed -i "$LINE i\WebUI\\\AuthSubnetWhitelistEnabled=true" qBittorrent.conf
|
sed -i "$LINE i\WebUI\\\AuthSubnetWhitelistEnabled=true" qBittorrent.conf
|
||||||
sed -i "$LINE i\WebUI\\\AuthSubnetWhitelist=$WHITELIST" qBittorrent.conf
|
sed -i "$LINE i\WebUI\\\AuthSubnetWhitelist=$WHITELIST" qBittorrent.conf
|
||||||
bashio::log.info "Whitelisted subsets will not require a password : $WHITELIST"
|
bashio::log.info "Whitelisted subsets will not require a password : $WHITELIST"
|
||||||
|
else
|
||||||
|
sed -i "$LINE i\WebUI\\\AuthSubnetWhitelistEnabled=false" qBittorrent.conf
|
||||||
|
bashio::log.info "Whitelisted subsets deactivated"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
|||||||
Reference in New Issue
Block a user