mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-25 08:46:03 +02:00
Update 00-openvpn.sh
This commit is contained in:
@@ -32,13 +32,9 @@ if [[ "$(bashio::config "VPN_ENABLED")" == "yes" ]] && [[ "$(bashio::config "VPN
|
|||||||
# Correct paths
|
# Correct paths
|
||||||
sed -i "s=/etc/openvpn=/config/openvpn=g" "$file"
|
sed -i "s=/etc/openvpn=/config/openvpn=g" "$file"
|
||||||
|
|
||||||
# Check if the last character in the file is a newline character
|
# Remove blank characters and add a trailing blank line
|
||||||
last_char=$(tail -c 1 "$file")
|
sed -i '/^[[:space:]]*$/d' "$file"
|
||||||
if [ "$last_char" != $'\n' ]; then
|
echo "" >> "$file"
|
||||||
# Add a blank line at the end of the file
|
|
||||||
echo >> "$file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user