11 lines
322 B
Bash
Executable File
11 lines
322 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#connection=$(pgrep -a openvpn$ | head -n 1 | awk '{print $NF }' | cut -d '.' -f 1)
|
|
connection=$(pgrep -a wg0 | head -n 1 | awk '{print $NF }' | cut -d '.' -f 1)
|
|
|
|
if [ -n "$connection" ]; then
|
|
echo "%{F#FFDE7D}%{T1}%{T-} %{T2}VPN: ON%{T-}"
|
|
else
|
|
echo "%{F#5f5f5f}%{T1}%{T-} %{T2}VPN: OFF%{T-}"
|
|
fi
|