From 4ac8a3dea8446565cd4fda91f64ff4f017d1984b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:25:38 +0100 Subject: [PATCH] Update 01-openvpn.sh --- qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh index 34f03909e..f1cdef600 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh @@ -10,10 +10,14 @@ if [ bashio::config "VPN_ENABLED" == "yes" ]; then # If there is a config file, add nopull if [ -n "$(ls -A /config/openvpn 2>/dev/null)" ]; then - if ! grep -q route-nopull /etc/openvpn/config.ovpn; then - echo "... adding route-nopull to your config.ovpn" - sed -i "1a route-nopull" /etc/openvpn/config.ovpn - fi + for file in /config/openvpn/*; do + if [ -f "$file" ]; then + if ! grep -q route-nopull "$file"; then + echo "... adding route-nopull to $file" + sed -i "1a route-nopull" "$file" + fi + fi + done fi else