diff --git a/qbittorrent/CHANGELOG.md b/qbittorrent/CHANGELOG.md index a8a582088..c30325886 100644 --- a/qbittorrent/CHANGELOG.md +++ b/qbittorrent/CHANGELOG.md @@ -1,5 +1,6 @@ -### 4.6.2-19_wireguard_openvpn (14-12-2023) +### 4.6.2-20_wireguard_openvpn (14-12-2023) - Minor bugs fixed +- Sanitize the ovpn file - Implement a sleep period to wait until vpn is up on faster systems - qbit_manage : add run command diff --git a/qbittorrent/config.json b/qbittorrent/config.json index 9d598f627..b851751e3 100644 --- a/qbittorrent/config.json +++ b/qbittorrent/config.json @@ -153,5 +153,5 @@ "slug": "qbittorrent", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "4.6.2-19_wireguard_openvpn" + "version": "4.6.2-20_wireguard_openvpn" } diff --git a/qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh index 0843f7e4d..c5519b77a 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh @@ -31,6 +31,13 @@ if [[ "$(bashio::config "VPN_ENABLED")" == "yes" ]] && [[ "$(bashio::config "VPN # Correct paths sed -i "s=/etc/openvpn=/config/openvpn=g" "$file" + + # Check if the last character in the file is a newline character + last_char=$(tail -c 1 "$file") + if [ "$last_char" != $'\n' ]; then + # Add a blank line at the end of the file + echo >> "$file" + fi fi done