From 64891f994e4da9f7c363c253c417ea70a7dbac3a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 24 Dec 2023 04:28:13 +0100 Subject: [PATCH] Update 93-openvpn.sh --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 14de8f1be..795953594 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -53,6 +53,11 @@ done < "$file" # Standardize lf dos2unix "$file" + + + # Correct paths + sed -i "s=/etc/openvpn=/config/openvpn=g" "$file" + } ##################### @@ -97,9 +102,6 @@ dos2unix "$file" cp /config/openvpn/"${openvpn_config}" /etc/openvpn/config.ovpn fi - # Correct paths - sed -i "s=/etc/openvpn=/config/openvpn=g" /etc/openvpn/config.ovpn - # Set credentials if bashio::config.has_value "openvpn_username"; then openvpn_username=$(bashio::config 'openvpn_username') @@ -117,6 +119,7 @@ dos2unix "$file" # Add credentials file if grep -q auth-user-pass /etc/openvpn/config.ovpn; then sed -i "s/auth-user-pass.*/auth-user-pass \/etc\/openvpn\/credentials/g" /etc/openvpn/config.ovpn + bashio::log.warning "auth-user-pass specified, will be replaced by the addon options' username and password" else echo "auth-user-pass /etc/openvpn/credentials" >> /etc/openvpn/config.ovpn fi