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

View file

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