Skip to content

Commit

Permalink
Update 00-openvpn.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Dec 13, 2023
1 parent 17b31e1 commit 0cdb665
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions qbittorrent/rootfs/etc/cont-init.d/00-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if [[ "$(bashio::config "VPN_ENABLED")" == "yes" ]] && [[ "$(bashio::config "VPN
if [ -f "$file" ]; then

# Convert to unix
echo "... converting to unix format $file"
dos2unix "$file"

# Remove route-nopull
Expand All @@ -28,21 +29,8 @@ if [[ "$(bashio::config "VPN_ENABLED")" == "yes" ]] && [[ "$(bashio::config "VPN
sed -i "/route-nopull/d" "$file"
fi

# Avoid ipv6
sed -i "/ipv6/d" "$file"

# Correct paths
sed -i "s=/etc/openvpn=/config/openvpn=g" "$file"

# Check proto
if grep -q "proto" "$file"; then
if [ -f /data/tdp ]; then
echo "... proto not found in your ovpn, assuming TDP"
sed -i "250a VPN_PROTOCOL=\"udp\"" /etc/cont-init.d/02-vpn.sh
else
echo "... proto not found in your ovpn, assuming UDP"
fi
fi

fi
done
Expand Down

0 comments on commit 0cdb665

Please sign in to comment.