10 lines
210 B
Bash
Executable file
10 lines
210 B
Bash
Executable file
#!/bin/bash
|
|
|
|
nm_active=`nmcli con show --active`
|
|
vpn_active='false'
|
|
|
|
if echo "${nm_active}" | grep -q 'vpn' || echo "${nm_active}" | grep -q 'wireguard';then
|
|
vpn_active='true'
|
|
fi
|
|
|
|
printf '%s' "${vpn_active}"
|