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

@@ -6,29 +6,29 @@
# If we have a service specific script, run this now
if [ -x /etc/openvpn/"${RC_SVCNAME}"-down.sh ]; then
/etc/openvpn/"${RC_SVCNAME}"-down.sh "$@"
/etc/openvpn/"${RC_SVCNAME}"-down.sh "$@"
fi
# Restore resolv.conf to how it was
if [ "${PEER_DNS}" != "no" ]; then
if [ -x /sbin/resolvconf ]; then
/sbin/resolvconf -d "${dev}"
elif [ -e /etc/resolv.conf-"${dev}".sv ]; then
# Important that we cat instead of move incase resolv.conf is
# a symlink and not an actual file
cat /etc/resolv.conf-"${dev}".sv >/etc/resolv.conf
rm -f /etc/resolv.conf-"${dev}".sv
fi
if [ -x /sbin/resolvconf ]; then
/sbin/resolvconf -d "${dev}"
elif [ -e /etc/resolv.conf-"${dev}".sv ]; then
# Important that we cat instead of move incase resolv.conf is
# a symlink and not an actual file
cat /etc/resolv.conf-"${dev}".sv > /etc/resolv.conf
rm -f /etc/resolv.conf-"${dev}".sv
fi
fi
if [ -n "${RC_SVCNAME}" ]; then
# Re-enter the init script to start any dependant services
if /etc/init.d/"${RC_SVCNAME}" --quiet status; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" >/var/run/s6/container_environment/IN_BACKGROUND; fi
printf "%s\n" "IN_BACKGROUND=\"true\"" >>~/.bashrc
/etc/init.d/"${RC_SVCNAME}" --quiet stop
fi
# Re-enter the init script to start any dependant services
if /etc/init.d/"${RC_SVCNAME}" --quiet status; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" > /var/run/s6/container_environment/IN_BACKGROUND; fi
printf "%s\n" "IN_BACKGROUND=\"true\"" >> ~/.bashrc
/etc/init.d/"${RC_SVCNAME}" --quiet stop
fi
fi
exit 0

View File

@@ -5,5 +5,5 @@ set -e
WEBUI_PORT=${WEBUI_PORT:-8080}
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \
s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}"
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \
s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}"

View File

@@ -25,44 +25,44 @@
# and try and let resolvconf handle it
if [ "${PEER_DNS}" != "no" ]; then
NS=
DOMAIN=
SEARCH=
i=1
while true; do
eval opt=\$foreign_option_${i}
[ -z "${opt}" ] && break
if [ "${opt}" != "${opt#dhcp-option DOMAIN *}" ]; then
if [ -z "${DOMAIN}" ]; then
DOMAIN="${opt#dhcp-option DOMAIN *}"
else
SEARCH="${SEARCH}${SEARCH:+ }${opt#dhcp-option DOMAIN *}"
fi
elif [ "${opt}" != "${opt#dhcp-option DNS *}" ]; then
NS="${NS}nameserver ${opt#dhcp-option DNS *}\n"
fi
i=$((${i} + 1))
done
NS=
DOMAIN=
SEARCH=
i=1
while true; do
eval opt=\$foreign_option_${i}
[ -z "${opt}" ] && break
if [ "${opt}" != "${opt#dhcp-option DOMAIN *}" ]; then
if [ -z "${DOMAIN}" ]; then
DOMAIN="${opt#dhcp-option DOMAIN *}"
else
SEARCH="${SEARCH}${SEARCH:+ }${opt#dhcp-option DOMAIN *}"
fi
elif [ "${opt}" != "${opt#dhcp-option DNS *}" ]; then
NS="${NS}nameserver ${opt#dhcp-option DNS *}\n"
fi
i=$((${i} + 1))
done
if [ -n "${NS}" ]; then
DNS="# Generated by openvpn for interface ${dev}\n"
if [ -n "${SEARCH}" ]; then
DNS="${DNS}search ${DOMAIN} ${SEARCH}\n"
elif [ -n "${DOMAIN}" ]; then
DNS="${DNS}domain ${DOMAIN}\n"
fi
DNS="${DNS}${NS}"
if [ -x /sbin/resolvconf ]; then
printf "${DNS}" | /sbin/resolvconf -a "${dev}"
else
# Preserve the existing resolv.conf
if [ -e /etc/resolv.conf ]; then
cp /etc/resolv.conf /etc/resolv.conf-"${dev}".sv
fi
printf "${DNS}" >/etc/resolv.conf
chmod 644 /etc/resolv.conf
fi
fi
if [ -n "${NS}" ]; then
DNS="# Generated by openvpn for interface ${dev}\n"
if [ -n "${SEARCH}" ]; then
DNS="${DNS}search ${DOMAIN} ${SEARCH}\n"
elif [ -n "${DOMAIN}" ]; then
DNS="${DNS}domain ${DOMAIN}\n"
fi
DNS="${DNS}${NS}"
if [ -x /sbin/resolvconf ]; then
printf "${DNS}" | /sbin/resolvconf -a "${dev}"
else
# Preserve the existing resolv.conf
if [ -e /etc/resolv.conf ]; then
cp /etc/resolv.conf /etc/resolv.conf-"${dev}".sv
fi
printf "${DNS}" > /etc/resolv.conf
chmod 644 /etc/resolv.conf
fi
fi
fi
# Below section is Gentoo specific
@@ -70,18 +70,18 @@ fi
# as we could have >1 openvpn service
if [ -n "${RC_SVCNAME}" ]; then
# If we have a service specific script, run this now
if [ -x /etc/openvpn/"${RC_SVCNAME}"-up.sh ]; then
/etc/openvpn/"${RC_SVCNAME}"-up.sh "$@"
fi
# If we have a service specific script, run this now
if [ -x /etc/openvpn/"${RC_SVCNAME}"-up.sh ]; then
/etc/openvpn/"${RC_SVCNAME}"-up.sh "$@"
fi
# Re-enter the init script to start any dependant services
if ! /etc/init.d/"${RC_SVCNAME}" --quiet status; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" >/var/run/s6/container_environment/IN_BACKGROUND; fi
printf "%s\n" "IN_BACKGROUND=\"true\"" >>~/.bashrc
/etc/init.d/${RC_SVCNAME} --quiet start
fi
# Re-enter the init script to start any dependant services
if ! /etc/init.d/"${RC_SVCNAME}" --quiet status; then
export IN_BACKGROUND=true
if [ -d /var/run/s6/container_environment ]; then printf "%s" "true" > /var/run/s6/container_environment/IN_BACKGROUND; fi
printf "%s\n" "IN_BACKGROUND=\"true\"" >> ~/.bashrc
/etc/init.d/${RC_SVCNAME} --quiet start
fi
fi
###############