Solve addition error

https://github.com/alexbelgium/hassio-addons/issues/1175
This commit is contained in:
Alexandre
2024-01-12 17:04:13 +01:00
committed by GitHub
parent 569a52ef9e
commit fda28b17fd

View File

@@ -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