dmenuvpn status faster
This commit is contained in:
parent
37f17eec95
commit
52949a1f66
@ -5,7 +5,7 @@ ETH_user="abocken@student-net.ethz.ch"
|
|||||||
ETH_password_path="ETH/VPN"
|
ETH_password_path="ETH/VPN"
|
||||||
|
|
||||||
if [ "$1" = "status" ]; then
|
if [ "$1" = "status" ]; then
|
||||||
if ping -c 1 -W 1 -q webprint.ethz.ch &> /dev/null
|
pgrep openconnect > /dev/null && if ping -c 1 -W 1 -q webprint.ethz.ch &> /dev/null
|
||||||
then
|
then
|
||||||
printf '🔬'
|
printf '🔬'
|
||||||
fi
|
fi
|
||||||
@ -18,7 +18,7 @@ else
|
|||||||
if [ "$choice" = "ETH" ]; then
|
if [ "$choice" = "ETH" ]; then
|
||||||
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
||||||
pass "$ETH_password_path" | sudo openconnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
pass "$ETH_password_path" | sudo openconnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||||
if ping -c 4 -W 6 -q webprint.ethz.ch ;then
|
if ping -c 3 -W 3 -q webprint.ethz.ch ;then
|
||||||
notify-send "ETH VPN" "ETH VPN connected"
|
notify-send "ETH VPN" "ETH VPN connected"
|
||||||
fi
|
fi
|
||||||
elif ping -c 1 -W 2 -q webprint.ethz.ch ;then
|
elif ping -c 1 -W 2 -q webprint.ethz.ch ;then
|
||||||
|
Loading…
Reference in New Issue
Block a user