15 lines
341 B
Bash
Executable file
15 lines
341 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if nmcli dev | grep tun0 | cut -f3 | grep " connecté" &>/dev/null
|
|
then
|
|
echo "<span foreground=\"#99CC99\">rpv</span>"
|
|
[[ ! -f /dev/shm/vpn ]] && echo 1 > /dev/shm/vpn
|
|
else
|
|
echo "<span foreground=\"#747369\">rpv</span>"
|
|
if [[ -f /dev/shm/vpn ]]
|
|
then
|
|
notify-send -u critical "RPV" "Déconnecté"
|
|
rm /dev/shm/vpn
|
|
fi
|
|
|
|
fi
|