protonvpn-cli-ng doesn't work anymore for some reason, so switching to plain OpenVPN configuration.
This commit is contained in:
parent
c0fdb7824a
commit
4076f44c1e
|
@ -1,15 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
STATUS=`protonvpn status | awk '{print "\\\n"$0}'`
|
||||
TOOLTIP=`echo -E ${STATUS} | cut -c 3-`
|
||||
CLASS=`echo ${STATUS} | grep 'Status' | awk '{print $2}'`
|
||||
TEXT=""
|
||||
|
||||
if [ $CLASS == "Connected" ]; then
|
||||
if ip a show tun0 > /dev/null 2>&1; then
|
||||
CLASS="Connected"
|
||||
TEXT="\uf084" # key
|
||||
else
|
||||
TEXT="\uf071" # exclamation-triangle
|
||||
fi
|
||||
|
||||
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}"
|
||||
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${CLASS}\", \"class\": \"${CLASS}\"}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue