Merge branch 'qbittorrent_vpn_overhaul' of https://github.com/litinoveweedle/alexbelgium-hassio-addons into qbittorrent_vpn_overhaul

This commit is contained in:
litinoveweedle
2026-02-04 09:26:52 +01:00
2 changed files with 5 additions and 2 deletions

View File

@@ -92,6 +92,7 @@ RUN \
# Copy local files
COPY rootfs/ /
RUN find /etc -type f \( -name "*.sh" -o -name "run" -o -name "finish" \) -exec chmod +x {} +
RUN chmod +x /usr/local/sbin/vpn
# Uses /bin for compatibility purposes
# hadolint ignore=DL4005

View File

@@ -42,8 +42,10 @@ fi
echo -e "${openvpn_username}\n${openvpn_password}" > "${OPENVPN_STATE_DIR}/credentials.conf"
chmod 600 "${OPENVPN_STATE_DIR}/credentials.conf"
openvpn_config="$(bashio::config 'openvpn_config')"
openvpn_config="${openvpn_config##*/}"
if bashio::config.has_value "openvpn_config"; then
openvpn_config="$(bashio::config 'openvpn_config')"
openvpn_config="${openvpn_config##*/}"
fi
if [[ -z "${openvpn_config}" ]]; then
bashio::log.info 'openvpn_config option left empty. Attempting automatic selection.'
mapfile -t configs < <(find /config/openvpn -maxdepth 1 \( -type f -name '*.conf' -o -name '*.ovpn' \) -print)