mirror of
https://github.com/pia-foss/manual-connections.git
synced 2025-02-05 14:08:29 +00:00
Detect interfaces on multiple distributions (fixes #25)
This modification will allow users that use specific distributions (example: Ubuntu 18.04) to use the OpenVPN scripts without getting any strange behavior on interface detection.
This commit is contained in:
parent
82ebed7c9c
commit
58f7ed3ad2
|
@ -37,10 +37,10 @@ check_tool openvpn
|
|||
# Check if manual PIA OpenVPN connection is already initialized.
|
||||
# Multi-hop is out of the scope of this repo, but you should be able to
|
||||
# get multi-hop running with both OpenVPN and WireGuard.
|
||||
adapter_check="$( ip a s tun06 )"
|
||||
adapter_check="$( ip a s tun06 2>&1 )"
|
||||
should_read="Device \"tun06\" does not exist"
|
||||
pid_filepath="/opt/piavpn-manual/pia_pid"
|
||||
if [[ "$adapter_check" != "$should_read" ]]; then
|
||||
if [[ "$adapter_check" != *"$should_read"* ]]; then
|
||||
echo The tun06 adapter already exists, that interface is required
|
||||
echo for this configuration.
|
||||
if [ -f "$pid_filepath" ]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user