fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-07-23 08:58:09 +00:00
committed by github-actions[bot]
parent 3539f328fb
commit f5428e0950
224 changed files with 5663 additions and 5662 deletions

View File

@@ -11,12 +11,12 @@ if [ -e "/MODULESFILE" ]; then
MODULES="${MODULES:-00-banner.sh}"
echo "Executing modules script : $MODULES"
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi &&
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi &&
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true &&
mkdir -p /etc/cont-init.d &&
for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done &&
chmod -R 755 /etc/cont-init.d
if ! command -v bash > /dev/null 2> /dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) > /dev/null; fi \
&& if ! command -v curl > /dev/null 2> /dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) > /dev/null; fi \
&& apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates > /dev/null || true \
&& mkdir -p /etc/cont-init.d \
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
&& chmod -R 755 /etc/cont-init.d
fi
#######################
@@ -26,12 +26,12 @@ if [ -e "/ENVFILE" ]; then
PACKAGES=$(< /ENVFILE)
echo "Executing dependency script with custom elements : $PACKAGES"
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi &&
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi &&
curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automatic_packages.sh" --output /ha_automatic_packages.sh &&
chmod 777 /ha_automatic_packages.sh &&
eval /./ha_automatic_packages.sh "${PACKAGES:-}" &&
rm /ha_automatic_packages.sh
if ! command -v bash > /dev/null 2> /dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) > /dev/null; fi \
&& if ! command -v curl > /dev/null 2> /dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) > /dev/null; fi \
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automatic_packages.sh" --output /ha_automatic_packages.sh \
&& chmod 777 /ha_automatic_packages.sh \
&& eval /./ha_automatic_packages.sh "${PACKAGES:-}" \
&& rm /ha_automatic_packages.sh
fi
if [ -e "/MODULESFILE" ] && [ ! -f /ha_entrypoint.sh ]; then

View File

@@ -99,8 +99,8 @@ if bashio::config.has_value 'localdisks'; then
if [ -d /share/"$disk" ]; then dirpath="/share"; fi
# shellcheck disable=SC2015
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to /mnt/$disk" ||
(
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to /mnt/$disk" \
|| (
bashio::log.fatal "Unable to mount local drives! Please check the name."
rmdir /mnt/"$disk"
bashio::addon.stop

View File

@@ -131,8 +131,8 @@ if bashio::config.has_value "graphic_driver"; then
curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
--silent \
--header 'GET' \
"${AUTH_URL}" |
jq -r '.token'
"${AUTH_URL}" \
| jq -r '.token'
)"
# Determine first and only layer of image
SHALAYER=$(get_blob_sha "${MODE}" "${TOKEN}" "${MANIFEST_URL}")

View File

@@ -257,15 +257,15 @@ for files in "/etc/services.d" "/etc/cont-init.d"; do
COMMAND="mustache"
if grep -q -rnw "$files/" -e "$COMMAND" && ! command -v $COMMAND &> /dev/null; then
[ "$VERBOSE" = true ] && echo "$COMMAND required"
[ "$PACKMANAGER" = "apk" ] && apk add --no-cache go npm &&
apk upgrade --no-cache &&
apk add --no-cache --virtual .build-deps build-base git go &&
go get -u github.com/quantumew/mustache-cli &&
cp "$GOPATH"/bin/* /usr/bin/ &&
rm -rf "$GOPATH" /var/cache/apk/* /tmp/src &&
apk del .build-deps xz build-base
[ "$PACKMANAGER" = "apt" ] && apt-get update &&
apt-get install -yqq go npm node-mustache
[ "$PACKMANAGER" = "apk" ] && apk add --no-cache go npm \
&& apk upgrade --no-cache \
&& apk add --no-cache --virtual .build-deps build-base git go \
&& go get -u github.com/quantumew/mustache-cli \
&& cp "$GOPATH"/bin/* /usr/bin/ \
&& rm -rf "$GOPATH" /var/cache/apk/* /tmp/src \
&& apk del .build-deps xz build-base
[ "$PACKMANAGER" = "apt" ] && apt-get update \
&& apt-get install -yqq go npm node-mustache
fi
done

View File

@@ -28,9 +28,9 @@ mkdir -p /etc/cont-init.d
# Download scripts
for scripts in $MODULES; do
echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" &&
[ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] ||
(echo "script failed to install $scripts" && exit 1)
echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" \
&& [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] \
|| (echo "script failed to install $scripts" && exit 1)
done
chmod -R 755 /etc/cont-init.d

3
.templates/ha_entrypoint.sh Executable file → Normal file
View File

@@ -61,7 +61,8 @@ for service_dir in /etc/services.d/*; do
# Replace s6-setuidgid with su-based equivalent
sed -i -E 's|^s6-setuidgid[[:space:]]+([a-zA-Z0-9._-]+)[[:space:]]+(.*)$|su -s /bin/bash \1 -c "\2"|g' "$runfile"
chmod +x "$runfile"
( exec "$runfile" ) & true
(exec "$runfile") &
true
fi
done

View File

@@ -97,8 +97,8 @@ for f in */; do
#Find current version
LOGINFO="... $SLUG : get current version" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
CURRENT=$(jq .upstream_version updater.json) ||
{
CURRENT=$(jq .upstream_version updater.json) \
|| {
bashio::log.error "$SLUG addon upstream tag not found in updater.json. Exiting."
continue
}
@@ -124,45 +124,45 @@ for f in */; do
DOCKERHUB_REPO="${UPSTREAM%%/*}"
DOCKERHUB_IMAGE=$(echo "$UPSTREAM" | cut -d "/" -f2)
LASTVERSION=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=$LISTSIZE$FILTER_TEXT" |
jq '.results | .[] | .name' -r |
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/d' |
sed -e '/.*nightly.*/d' |
sed -e '/.*beta.*/d' |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sort -V |
tail -n 1
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=$LISTSIZE$FILTER_TEXT" \
| jq '.results | .[] | .name' -r \
| sed -e '/.*latest.*/d' \
| sed -e '/.*dev.*/d' \
| sed -e '/.*nightly.*/d' \
| sed -e '/.*beta.*/d' \
| sed -e "/.*$EXCLUDE_TEXT.*/d" \
| sort -V \
| tail -n 1
)
[ "${BETA}" = true ] &&
LASTVERSION=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=$LISTSIZE$FILTER_TEXT" |
jq '.results | .[] | .name' -r |
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/!d' |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sort -V |
tail -n 1
[ "${BETA}" = true ] \
&& LASTVERSION=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=$LISTSIZE$FILTER_TEXT" \
| jq '.results | .[] | .name' -r \
| sed -e '/.*latest.*/d' \
| sed -e '/.*dev.*/!d' \
| sed -e "/.*$EXCLUDE_TEXT.*/d" \
| sort -V \
| tail -n 1
)
[ "${BYDATE}" = true ] &&
LASTVERSION=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
jq '.results | .[] | .name' -r |
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/d' |
sed -e '/.*nightly.*/d' |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sort -V |
tail -n 1
) &&
DATE=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
jq '.results[] | select(.name==$LASTVERSION) | .last_updated' -r --arg LASTVERSION "$LASTVERSION"
) &&
DATE="${DATE%T*}" &&
LASTVERSION="$LASTVERSION-$DATE"
[ "${BYDATE}" = true ] \
&& LASTVERSION=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" \
| jq '.results | .[] | .name' -r \
| sed -e '/.*latest.*/d' \
| sed -e '/.*dev.*/d' \
| sed -e '/.*nightly.*/d' \
| sed -e "/.*$EXCLUDE_TEXT.*/d" \
| sort -V \
| tail -n 1
) \
&& DATE=$(
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" \
| jq '.results[] | select(.name==$LASTVERSION) | .last_updated' -r --arg LASTVERSION "$LASTVERSION"
) \
&& DATE="${DATE%T*}" \
&& LASTVERSION="$LASTVERSION-$DATE"
LOGINFO="... $SLUG : bydate is true, version is $LASTVERSION" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
else
@@ -226,13 +226,13 @@ for f in */; do
if [[ "$(echo -n "$last_packages" | grep -c '^')" -gt 0 ]]; then
bashio::log.warning "A total of $(echo -n "$last_packages" | grep -c '^') packages were found, using $last_package"
LASTVERSION=""
LASTVERSION="$(curl -s -L https://github.com/"$UPSTREAM"/pkgs/container/"$last_package" | sed -n "s/.*?tag=\([^\"]*\)\">.*/\1/p" |
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/d' |
sed -e '/.*nightly.*/d' |
sed -e '/.*beta.*/d' |
sort -V |
tail -n 1)" || true
LASTVERSION="$(curl -s -L https://github.com/"$UPSTREAM"/pkgs/container/"$last_package" | sed -n "s/.*?tag=\([^\"]*\)\">.*/\1/p" \
| sed -e '/.*latest.*/d' \
| sed -e '/.*dev.*/d' \
| sed -e '/.*nightly.*/d' \
| sed -e '/.*beta.*/d' \
| sort -V \
| tail -n 1)" || true
if [[ "$LASTVERSION" == "" ]]; then
# Continue to next
bashio::log.warning "No packages found"

View File

@@ -8,6 +8,6 @@ chown -R nginx:nginx /data
# Start app
# Find the PHP FPM service script and start it
find /etc/init.d -type f -name "php*-fpm" -exec {} start \; &&
chown -R nginx:nginx /data/Specific &&
nginx -g "daemon off;"
find /etc/init.d -type f -name "php*-fpm" -exec {} start \; \
&& chown -R nginx:nginx /data/Specific \
&& nginx -g "daemon off;"

0
calibre_web/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
emby/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
emby_beta/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

@@ -104,11 +104,6 @@
"DAC_READ_SEARCH"
],
"schema": {
"cifsdomain": "str?",
"cifspassword": "str?",
"cifsusername": "str?",
"localdisks": "str?",
"networkdisks": "str?",
"DB_DATABASE_NAME": "str?",
"DB_HOSTNAME": "str?",
"DB_PASSWORD": "str",
@@ -120,7 +115,12 @@
"MINIO_ROOT_PASSWORD": "str",
"MINIO_ROOT_USER": "str",
"TZ": "str?",
"USE_EXTERNAL_DB": "bool?"
"USE_EXTERNAL_DB": "bool?",
"cifsdomain": "str?",
"cifspassword": "str?",
"cifsusername": "str?",
"localdisks": "str?",
"networkdisks": "str?"
},
"slug": "ente",
"udev": true,

6
ente/rootfs/etc/cont-init.d/99-run.sh Executable file → Normal file
View File

@@ -141,10 +141,12 @@ start_postgres() {
wait_postgres_ready() {
local host port
if $USE_EXTERNAL_DB; then
host="$DB_HOST_EXT"; port="$DB_PORT_EXT"
host="$DB_HOST_EXT"
port="$DB_PORT_EXT"
bashio::log.info "Waiting for EXTERNAL Postgres at ${host}:${port}..."
else
host="$DB_HOST_INTERNAL"; port="$DB_PORT_INTERNAL"
host="$DB_HOST_INTERNAL"
port="$DB_PORT_INTERNAL"
bashio::log.info "Waiting for internal Postgres..."
fi
until pg_isready -q -h "$host" -p "$port"; do sleep 1; done

View File

@@ -68,8 +68,8 @@
"/dev/nvme2"
],
"environment": {
"PGDATA": "/config/postgres",
"GUACAMOLE_HOME": "/config"
"GUACAMOLE_HOME": "/config",
"PGDATA": "/config/postgres"
},
"image": "ghcr.io/alexbelgium/guacamole-{arch}",
"ingress": true,

0
guacamole/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
jellyfin/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

@@ -118,9 +118,9 @@ exec nginx &
if bashio::config.has_value 'run_duration'; then
RUNTIME=$(bashio::config 'run_duration')
bashio::log.info "Addon will stop after $RUNTIME"
sleep "$RUNTIME" &&
bashio::log.info "Timeout achieved, addon will stop !" &&
exit 0
sleep "$RUNTIME" \
&& bashio::log.info "Timeout achieved, addon will stop !" \
&& exit 0
else
bashio::log.info "Run_duration option not defined, addon will run continuously"
fi

View File

@@ -70,10 +70,10 @@ execute_main_logic() {
NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']"
sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file"
# Check availability of hosts
VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2>/dev/null |
grep "responded" |
awk -F'.' '{print $NF}' |
awk '{print $1}' || true)"
VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2> /dev/null \
| grep "responded" \
| awk -F'.' '{print $NF}' \
| awk '{print $1}' || true)"
echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf"
fi
fi

View File

@@ -22,15 +22,16 @@ if bashio::config.has_value 'trusted_domains'; then
bashio::log.info "Currently set trusted domains :"
$LAUNCHER config:system:get trusted_domains || bashio::log.info "No trusted domain set yet. The first one will be set when doing initial configuration"
bashio::log.info "Trusted domains set in the configuration. Refreshing domains." &&
bashio::log.info "Trusted domains set in the configuration. Refreshing domains." \
&&
###################################
# Remove previous trusted domains #
###################################
bashio::log.info "... removing previously added trusted domain (except for first one created)"
i=2
until [ $i -gt 5 ]; do
$LAUNCHER config:system:delete trusted_domains $i &&
((i = i + 1)) || exit
$LAUNCHER config:system:delete trusted_domains $i \
&& ((i = i + 1)) || exit
done
###########################

0
nextcloud/rootfs/etc/services.d/cron/run Normal file → Executable file
View File

0
nzbget/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

@@ -34,16 +34,16 @@ mariadb_addon)
PHOTOPRISM_DATABASE_NAME="photoprism"
PHOTOPRISM_DATABASE_USER="$(bashio::services 'mysql' 'username')"
PHOTOPRISM_DATABASE_PASSWORD="$(bashio::services 'mysql' 'password')"
export PHOTOPRISM_DATABASE_DRIVER &&
bashio::log.blue "PHOTOPRISM_DATABASE_DRIVER=$PHOTOPRISM_DATABASE_DRIVER"
export PHOTOPRISM_DATABASE_SERVER &&
bashio::log.blue "PHOTOPRISM_DATABASE_SERVER=$PHOTOPRISM_DATABASE_SERVER"
export PHOTOPRISM_DATABASE_NAME &&
bashio::log.blue "PHOTOPRISM_DATABASE_NAME=$PHOTOPRISM_DATABASE_NAME"
export PHOTOPRISM_DATABASE_USER &&
bashio::log.blue "PHOTOPRISM_DATABASE_USER=$PHOTOPRISM_DATABASE_USER"
export PHOTOPRISM_DATABASE_PASSWORD &&
bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD"
export PHOTOPRISM_DATABASE_DRIVER \
&& bashio::log.blue "PHOTOPRISM_DATABASE_DRIVER=$PHOTOPRISM_DATABASE_DRIVER"
export PHOTOPRISM_DATABASE_SERVER \
&& bashio::log.blue "PHOTOPRISM_DATABASE_SERVER=$PHOTOPRISM_DATABASE_SERVER"
export PHOTOPRISM_DATABASE_NAME \
&& bashio::log.blue "PHOTOPRISM_DATABASE_NAME=$PHOTOPRISM_DATABASE_NAME"
export PHOTOPRISM_DATABASE_USER \
&& bashio::log.blue "PHOTOPRISM_DATABASE_USER=$PHOTOPRISM_DATABASE_USER"
export PHOTOPRISM_DATABASE_PASSWORD \
&& bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD"
{
echo "export PHOTOPRISM_DATABASE_DRIVER=\"${PHOTOPRISM_DATABASE_DRIVER}\""

View File

@@ -12,8 +12,8 @@ for SCRIPTS in "/00-banner.sh" "/00-local_mounts.sh" "/00-smb_mounts.sh"; do
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
chmod a+x $SCRIPTS
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' $SCRIPTS
/.$SCRIPTS &&
true || true # Prevents script crash on failure
/.$SCRIPTS \
&& true || true # Prevents script crash on failure
echo "exit $?"
done

View File

View File

@@ -29,7 +29,7 @@ bashio::var.json \
protocol "${portainer_protocol}" \
certfile "$(bashio::config 'certfile')" \
keyfile "$(bashio::config 'keyfile')" \
ssl "^$(bashio::config 'ssl')" |
tempio \
ssl "^$(bashio::config 'ssl')" \
| tempio \
-template /etc/nginx/templates/ingress.gtpl \
-out /etc/nginx/servers/ingress.conf

0
portainer/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
portainer/rootfs/etc/services.d/portainer/run Normal file → Executable file
View File

View File

View File

@@ -13,7 +13,8 @@ else
########################################################
# DRAFT : Start wireguard if needed
if bashio::config.true 'wireguard_enabled'; then
wg-quick up /config/wireguard/config.conf & true
wg-quick up /config/wireguard/config.conf &
true
fi
########################################################

2
qbittorrent/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

@@ -10,7 +10,7 @@ bashio::log.info "Starting NGinx..."
# Check vpn is working
if [ -f /currentip ]; then
nginx || nginx -s reload & \
nginx || nginx -s reload &
while true; do
# Get vpn ip
if ! bashio::config.true 'wireguard_enabled' && bashio::config.true 'openvpn_alt_mode'; then

0
qbittorrent/rootfs/etc/services.d/timer/run Normal file → Executable file
View File

0
radarr/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
readarr/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
resiliosync/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
scrutiny/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
sonarr/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
spotweb/rootfs/etc/services.d/cron/run Normal file → Executable file
View File

0
spotweb/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
spotweb/rootfs/etc/services.d/phpfpm/run Normal file → Executable file
View File

12
tor/rootfs/etc/s6-overlay/s6-rc.d/init-tor/run Normal file → Executable file
View File

@@ -38,8 +38,7 @@ fi
# Checks if client names where configured when using stealth mode
if bashio::config.true 'hidden_services' \
&& bashio::config.true 'stealth' \
&& ! bashio::config.has_value 'client_names';
then
&& ! bashio::config.has_value 'client_names'; then
bashio::log.fatal
bashio::log.fatal 'Add-on configuration is incomplete.'
bashio::log.fatal
@@ -132,8 +131,7 @@ fi
# Configure bridges
if bashio::config.exists 'bridges' \
&& ! bashio::config.is_empty 'bridges';
then
&& ! bashio::config.is_empty 'bridges'; then
bashio::log.info 'Use bridges:'
echo "UseBridges 1" >> "${torrc}"
@@ -176,14 +174,12 @@ if bashio::config.true 'hidden_services'; then
fi
# Configure stealth mode
if bashio::config.true 'hidden_services' && bashio::config.true 'stealth';
then
if bashio::config.true 'hidden_services' && bashio::config.true 'stealth'; then
# Following the documentation at:
# https://community.torproject.org/onion-services/advanced/client-auth/
while read -r clientname; do
# Generate key is they do not exist yet
if ! bashio::fs.file_exists "${authorized_clients_dir}/${clientname}.auth"
then
if ! bashio::fs.file_exists "${authorized_clients_dir}/${clientname}.auth"; then
key=$(openssl genpkey -algorithm x25519)
private_key=$(

0
tor/rootfs/etc/s6-overlay/s6-rc.d/tor/run Normal file → Executable file
View File

View File

@@ -85,8 +85,8 @@ if bashio::config.has_value 'watch_dir'; then
CONFIG=$(bashio::jq "${CONFIG}" ".\"watch-dir\"=\"$(bashio::config 'watch_dir')\"")
fi
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
###############
@@ -104,8 +104,8 @@ fi
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
echo "${CONFIG}" > "$CONFIGDIR"/settings.json \
&& jq . -S "$CONFIGDIR"/settings.json | cat > temp.json && mv temp.json "$CONFIGDIR"/settings.json
# WHITELIST
###########
@@ -121,5 +121,5 @@ else
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

View File

@@ -34,8 +34,8 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C
;;
"kettu")
mkdir -p /kettu &&
curl -o /tmp/kettu.tar.gz -L "https://github.com/endor/kettu/archive/master.tar.gz"
mkdir -p /kettu \
&& curl -o /tmp/kettu.tar.gz -L "https://github.com/endor/kettu/archive/master.tar.gz"
tar xf /tmp/kettu.tar.gz -C /kettu --strip-components=1
;;
@@ -46,18 +46,18 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C
"transmissionic")
TRANSMISSIONIC_VERSION=$(curl -s -L "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" | jq -r .tag_name)
echo "**** grab transmissionic ****" &&
if [ -z "${TRANSMISSIONIC_VERSION+x}" ]; then
TRANSMISSIONIC_VERSION="$(curl -s "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" |
jq -rc ".tag_name")"
fi &&
curl -o \
echo "**** grab transmissionic ****" \
&& if [ -z "${TRANSMISSIONIC_VERSION+x}" ]; then
TRANSMISSIONIC_VERSION="$(curl -s "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" \
| jq -rc ".tag_name")"
fi \
&& curl -o \
/tmp/transmissionic.zip -L \
"https://github.com/6c65726f79/Transmissionic/releases/download/${TRANSMISSIONIC_VERSION}/Transmissionic-webui-${TRANSMISSIONIC_VERSION}.zip" &&
unzip \
"https://github.com/6c65726f79/Transmissionic/releases/download/${TRANSMISSIONIC_VERSION}/Transmissionic-webui-${TRANSMISSIONIC_VERSION}.zip" \
&& unzip \
/tmp/transmissionic.zip -d \
/themes &&
mv /themes/web /transmissionic
/themes \
&& mv /themes/web /transmissionic
;;
**)

0
transmission/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

@@ -14,13 +14,13 @@ if bashio::config.has_value 'theme'; then
### Download WebUI
case "$CUSTOMUI" in
"comixology2")
curl -f -s -S -J -L -o /data/release.zip https://github.com/scooterpsu/Comixology_Ubooquity_2/releases/download/v3.4/comixology2.zip >/dev/null &&
unzip -o -q /data/release.zip -d /config/addons_config/ubooquity/themes/
curl -f -s -S -J -L -o /data/release.zip https://github.com/scooterpsu/Comixology_Ubooquity_2/releases/download/v3.4/comixology2.zip > /dev/null \
&& unzip -o -q /data/release.zip -d /config/addons_config/ubooquity/themes/
;;
"plextheme-master")
curl -f -s -S -J -L -o /data/release.zip https://github.com/FinalAngel/plextheme/archive/master.zip >/dev/null &&
unzip -q /data/release.zip -d /config/addons_config/ubooquity/themes/
curl -f -s -S -J -L -o /data/release.zip https://github.com/FinalAngel/plextheme/archive/master.zip > /dev/null \
&& unzip -q /data/release.zip -d /config/addons_config/ubooquity/themes/
# && mv /config/addons_config/ubooquity/themes/plextheme-master/ /config/addons_config/ubooquity/themes/
;;

0
ubooquity/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

@@ -56,8 +56,8 @@ if bashio::config.true 'install_ms_edge'; then
echo "**** install edge ****"
apt-get install --no-install-recommends -y ca-certificates
if [ -z ${EDGE_VERSION+x} ]; then
EDGE_VERSION=$(curl -sL https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/ |
awk -F'(<a href="microsoft-edge-stable_|_amd64.deb\")' '/href=/ {print $2}' | sort --version-sort | tail -1)
EDGE_VERSION=$(curl -sL https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/ \
| awk -F'(<a href="microsoft-edge-stable_|_amd64.deb\")' '/href=/ {print $2}' | sort --version-sort | tail -1)
fi
curl -o /tmp/edge.deb -L "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_${EDGE_VERSION}_amd64.deb"
dpkg -I /tmp/edge.deb

View File

0
zzz_archived_bitwarden/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File