From 6d244fe65e757457fb58141885e4cd357662e89e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 30 Dec 2023 20:22:19 +0100 Subject: [PATCH] Update 93-openvpn.sh --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index f2ecf1d39..511de3493 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -39,7 +39,7 @@ if bashio::config.true 'openvpn_enabled'; then # Extract the txt file name from the line file_name="$(echo "$line" | awk -F' ' '{print $2}')" # Check if the txt file exists - if [ ! -f "$file_name" ]; then + if [[ "$file_name" != *"/etc/openvpn/credentials"* ]] && [ ! -f "$file_name" ]; then # Check if the txt file exists in the /config/openvpn/ directory if [ -f "/config/openvpn/${file_name##*/}" ]; then # Append /config/openvpn/ in front of the original txt file in the ovpn file @@ -137,7 +137,7 @@ if bashio::config.true 'openvpn_enabled'; then file_name="${file_name:-null}" if grep -q ^auth-user-pass /config/openvpn/"$openvpn_config" ; then # Credentials specified are they custom ? - if [[ "$file_name" != *"/etc/openvpn/credentials"* ]] && [[ "$file_name" != "null" ]]; then + if [[ "$file_name" != *"/etc/openvpn/credentials"* ]] && [[ "$file_name" != "null" ]]; then if [ -f "$file_name" ]; then # If credential specified, exists, and is not the addon default bashio::log.warning "auth-user-pass specified in the ovpn file, addon username and passwords won't be used !"