diff --git a/qbittorrent/rootfs/etc/openvpn/down.sh b/qbittorrent/rootfs/etc/openvpn/down.sh index c83569cbe..665e4ae33 100644 --- a/qbittorrent/rootfs/etc/openvpn/down.sh +++ b/qbittorrent/rootfs/etc/openvpn/down.sh @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable=SD2154,SC2004,SC2059,SC2086 +# shellcheck disable=SC2154,SC2004,SC2059,SC2086 # Copyright (c) 2006-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Contributed by Roy Marples (uberlord@gentoo.org) diff --git a/qbittorrent/rootfs/etc/openvpn/up.sh b/qbittorrent/rootfs/etc/openvpn/up.sh index 8d369a2f1..7348c64d0 100644 --- a/qbittorrent/rootfs/etc/openvpn/up.sh +++ b/qbittorrent/rootfs/etc/openvpn/up.sh @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable=SD2154,SC2004,SC2059,SC2086 +# shellcheck disable=SC2154,SC2004,SC2059,SC2086 # launch qbittorrent /etc/openvpn/up-qbittorrent.sh "${4}" & diff --git a/readarr/rootfs/etc/cont-init.d/00-config_location.sh b/readarr/rootfs/etc/cont-init.d/00-config_location.sh index 695d2772d..3216aab5c 100644 --- a/readarr/rootfs/etc/cont-init.d/00-config_location.sh +++ b/readarr/rootfs/etc/cont-init.d/00-config_location.sh @@ -4,8 +4,8 @@ CONFIG_LOCATION=$(bashio::config 'CONFIG_LOCATION') bashio::log.info "Config stored in $CONFIG_LOCATION" -mkdir -p $CONFIG_LOCATION -chown -R abc:abc $CONFIG_LOCATION +mkdir -p "$CONFIG_LOCATION" +chown -R abc:abc "$CONFIG_LOCATION" sed -i "s|/config/readarr|$CONFIG_LOCATION|g" /etc/services.d/readarr/run sed -i "s|/config/readarr|$CONFIG_LOCATION|g" /etc/cont-init.d/30-config diff --git a/scrutiny/rootfs/run.sh b/scrutiny/rootfs/run.sh index 706b3a921..30bc73d68 100644 --- a/scrutiny/rootfs/run.sh +++ b/scrutiny/rootfs/run.sh @@ -9,4 +9,5 @@ bashio::net.wait_for 8080 ##################### # search for local devices +# shellcheck disable=SC2015 scrutiny-collector-metrics run >/dev/null && bashio::log.info "Local Devices Added" || bashio::log.error "Local Devices Not Added" diff --git a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh index d41d61e4e..cd24a7aca 100644 --- a/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh +++ b/tandoor_recipes/rootfs/etc/cont-init.d/99-run.sh @@ -1,5 +1,6 @@ #!/usr/bin/with-contenv bashio # shellcheck shell=bash +# shellcheck disable=SC2155 ##################### # Export env values # @@ -74,5 +75,5 @@ ln -s /config/addons_config/tandoor_recipes/mediafiles /opt/recipes ln -s /data/recipes/staticfiles /opt/recipes bashio::log.info "Launching app" -cd /opt/recipes +cd /opt/recipes || exit ./boot.sh diff --git a/transmission/rootfs/etc/cont-init.d/19-config.sh b/transmission/rootfs/etc/cont-init.d/19-config.sh index c75611dbe..bc9e25e07 100644 --- a/transmission/rootfs/etc/cont-init.d/19-config.sh +++ b/transmission/rootfs/etc/cont-init.d/19-config.sh @@ -4,13 +4,13 @@ rm -rf /etc/cont-init.d/20-config || true declare CONFIG -declare incomplete_bool +#declare incomplete_bool declare download_dir declare incomplete_dir declare USER declare PASS declare WHITELIST -declare HOST_WHITELIST +#declare HOST_WHITELIST CONFIGDIR="/config/transmission" @@ -37,7 +37,7 @@ fi if bashio::config.has_value 'customUI'; then CUSTOMUI=$(bashio::config 'customUI') - [ $CUSTOMUI != "standard" ] && sed -i "1a export TRANSMISSION_WEB_HOME=\"/$CUSTOMUI/\"" /etc/services.d/transmission/run + [ "$CUSTOMUI" != "standard" ] && sed -i "1a export TRANSMISSION_WEB_HOME=\"/$CUSTOMUI/\"" /etc/services.d/transmission/run # Enable transmission-web-control return to default UI if [ ! -f "/transmission-web-control/index.original.html" ]; then @@ -59,15 +59,15 @@ CONFIG=$(<$CONFIGDIR/settings.json) # Permissions echo "Updating permissions" -mkdir -p $download_dir -chown abc:abc $download_dir +mkdir -p "$download_dir" +chown abc:abc "$download_dir" # if incomplete dir > 2, to allow both null and '', set it as existing if [ ${#incomplete_dir} -ge 2 ]; then echo "Incomplete dir set: $incomplete_dir" CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=true") - mkdir -p $incomplete_dir - chown abc:abc $incomplete_dir + mkdir -p "$incomplete_dir" + chown abc:abc "$incomplete_dir" else echo "Incomplete dir disabled" CONFIG=$(bashio::jq "${CONFIG}" ".\"incomplete-dir-enabled\"=false") @@ -79,8 +79,8 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"download-dir\"=\"${download_dir}\"") CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-host-whitelist-enabled\"=false") CONFIG=$(bashio::jq "${CONFIG}" ".\"bind-address-ipv4\"=\"0.0.0.0\"") -echo "${CONFIG}" >$CONFIGDIR/settings.json && - jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json +echo "${CONFIG}" >"$CONFIGDIR"/settings.json && + jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json # USER and PASS ############### @@ -99,21 +99,21 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-authentication-required\"=${BOOLEAN}") CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-username\"=\"${USER}\"") CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-password\"=\"${PASS}\"") echo "${CONFIG}" >$CONFIGDIR/settings.json && - jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json + jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json # WHITELIST ########### -CONFIG=$(<$CONFIGDIR/settings.json) +CONFIG=$(<"$CONFIGDIR"/settings.json) WHITELIST=$(bashio::config 'whitelist') if bashio::config.has_value 'whitelist'; then BOOLEAN=true bashio::log.info "Whitelist set, no authentification from IP $WHITELIST" else BOOLEAN=false - sed -i "2 i\"rpc-whitelist-enabled\": false," $CONFIGDIR/settings.json + sed -i "2 i\"rpc-whitelist-enabled\": false," "$CONFIGDIR"/settings.json fi CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-whitelist-enabled\"=${BOOLEAN}") CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-whitelist\"=\"$WHITELIST\"") -echo "${CONFIG}" >$CONFIGDIR/settings.json && - jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json +echo "${CONFIG}" >"$CONFIGDIR"/settings.json && + jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json