mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-03 11:50:32 +02:00
GitHub bot: fix linting issues (nobuild)
This commit is contained in:
@@ -78,13 +78,13 @@ fi
|
|||||||
# Add directories to dir_whitelist if missing
|
# Add directories to dir_whitelist if missing
|
||||||
DIRS_TO_ADD=("/backup" "/media" "/share" "/addons")
|
DIRS_TO_ADD=("/backup" "/media" "/share" "/addons")
|
||||||
for CONFIG_FILE in "$(bashio::config 'config_location')/sync.conf" "/defaults/sync.conf"; do
|
for CONFIG_FILE in "$(bashio::config 'config_location')/sync.conf" "/defaults/sync.conf"; do
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
echo "Checking dir_whitelist in $CONFIG_FILE"
|
echo "Checking dir_whitelist in $CONFIG_FILE"
|
||||||
for DIR in "${DIRS_TO_ADD[@]}"; do
|
for DIR in "${DIRS_TO_ADD[@]}"; do
|
||||||
if ! jq -e ".webui.dir_whitelist | index(\"$DIR\")" "$CONFIG_FILE" > /dev/null; then
|
if ! jq -e ".webui.dir_whitelist | index(\"$DIR\")" "$CONFIG_FILE" >/dev/null; then
|
||||||
echo "Adding $DIR to dir_whitelist"
|
echo "Adding $DIR to dir_whitelist"
|
||||||
jq ".webui.dir_whitelist += [\"$DIR\"]" "$CONFIG_FILE" | sponge "$CONFIG_FILE"
|
jq ".webui.dir_whitelist += [\"$DIR\"]" "$CONFIG_FILE" | sponge "$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user