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
|
#!/bin/sh
|
||||||
|
|
||||||
STATUS=`protonvpn status | awk '{print "\\\n"$0}'`
|
if ip a show tun0 > /dev/null 2>&1; then
|
||||||
TOOLTIP=`echo -E ${STATUS} | cut -c 3-`
|
CLASS="Connected"
|
||||||
CLASS=`echo ${STATUS} | grep 'Status' | awk '{print $2}'`
|
|
||||||
TEXT=""
|
|
||||||
|
|
||||||
if [ $CLASS == "Connected" ]; then
|
|
||||||
TEXT="\uf084" # key
|
TEXT="\uf084" # key
|
||||||
else
|
else
|
||||||
TEXT="\uf071" # exclamation-triangle
|
TEXT="\uf071" # exclamation-triangle
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}"
|
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${CLASS}\", \"class\": \"${CLASS}\"}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue