protonvpn-cli-ng doesn't work anymore for some reason, so switching to plain OpenVPN configuration.

This commit is contained in:
the_4n0nym0u53 2021-12-13 23:59:38 +01:00
parent c0fdb7824a
commit 4076f44c1e
No known key found for this signature in database
GPG Key ID: 35EE09F5481049BB
1 changed files with 3 additions and 7 deletions

View File

@ -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}\"}"