2017-11-22 01:27:01 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-09-09 20:04:37 +02:00
|
|
|
echo -n "vpn "
|
|
|
|
|
2018-03-06 14:47:28 +01:00
|
|
|
if nmcli dev | grep tun0 | cut -f3 | grep " connecté" &>/dev/null
|
2017-11-22 01:27:01 +01:00
|
|
|
then
|
2019-07-19 23:11:53 +02:00
|
|
|
echo "<span foreground=\"#99CC99\">█</span>"
|
2019-04-19 22:18:25 +02:00
|
|
|
[[ ! -f /dev/shm/vpn ]] && echo 1 > /dev/shm/vpn
|
2017-11-22 01:27:01 +01:00
|
|
|
else
|
2019-07-19 23:11:53 +02:00
|
|
|
echo "<span foreground=\"#515151\">█</span>"
|
2019-04-19 22:18:25 +02:00
|
|
|
if [[ -f /dev/shm/vpn ]]
|
|
|
|
then
|
|
|
|
notify-send -u critical "VPN" "Déconnecté"
|
|
|
|
rm /dev/shm/vpn
|
|
|
|
fi
|
|
|
|
|
2017-11-22 01:27:01 +01:00
|
|
|
fi
|