Skip to content

Commit

Permalink
ovpn sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Dec 14, 2023
1 parent af5ddba commit a71d985
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a71d985

Please sign in to comment.