From 7a02e59b972378ea91d6fbc99353359e48292888 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 28 Feb 2022 07:26:58 +0100 Subject: [PATCH] Update 93-openvpn.sh --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 6 ++++-- 1 file changed, 4 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 5939dbb1b..090402470 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -53,8 +53,10 @@ if bashio::config.true 'openvpn_enabled'; then cd /config/qBittorrent/ || exit 1 LINE=$(sed -n '/[Preferences]/=' qBittorrent.conf) LINE=$((LINE + 1)) - SESSION=$(sed -n '/[BitTorrent]/=' qBittorrent.conf) - SESSION=$((SESSION + 1)) + if [ "$SESSION" != "" ]; then + SESSION=$(sed -n '/[BitTorrent]/=' qBittorrent.conf) + SESSION=$((SESSION + 1)) + fi # If qBittorrent.conf exists if [ -f "$QBT_CONFIG_FILE" ]; then