mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
/etc/openvpn/config.ovpn
This commit is contained in:
@@ -55,7 +55,23 @@ if bashio::config.true 'openvpn_enabled'; then
|
||||
bashio::log.error "qBittorrent config file doesn't exist, openvpn must be added manually to qbittorrent options "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#####################
|
||||
# ALTERNATIVE MODE #
|
||||
#####################
|
||||
|
||||
if bashio::config.true 'openvpn_alternative_mode'; then
|
||||
# Remove previous line and bind tun0
|
||||
sed -i '/Interface/d' qBittorrent.conf
|
||||
# Bind tun0
|
||||
sed -i "$LINE i\Connection\\\Interface=tun0" qBittorrent.conf
|
||||
sed -i "$LINE i\Connection\\\InterfaceName=tun0" qBittorrent.conf
|
||||
# Modify ovpn config
|
||||
echo "route-nopull" >> /etc/openvpn/config.ovpn
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
##################
|
||||
# REMOVE OPENVPN #
|
||||
##################
|
||||
@@ -63,4 +79,5 @@ else
|
||||
cd /config/qBittorrent/
|
||||
sed -i '/Interface/d' qBittorrent.conf
|
||||
bashio::log.info "Direct connection without VPN enabled"
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user