From fda28b17fd2582c91a44494913f43388830ef7a9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:04:13 +0100 Subject: [PATCH] Solve addition error https://github.com/alexbelgium/hassio-addons/issues/1175 --- 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 6bf6d4d03..412c38772 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -34,7 +34,7 @@ if bashio::config.true 'openvpn_enabled'; then line_number=0 while read -r line; do # Increment the line number - ((line_number++)) + ((line_number=line_number+1)) # Check if lines starting with auth-user-pass have a valid argument ################################################################### @@ -46,7 +46,7 @@ if bashio::config.true 'openvpn_enabled'; then # Insert to explain why a comment is made sed -i "${line_number}i # The following line is commented out as does not contain a valid argument" "$file" # Increment as new line added - ((line_number++)) + ((line_number=line_number+1)) # Comment out the line sed -i "${line_number}s/^/# /" "$file" # Go to next line