improved uni vpn script
This commit is contained in:
parent
7f476e0d77
commit
e137cdb813
@ -1,6 +1,6 @@
|
|||||||
[FileDialog]
|
[FileDialog]
|
||||||
history=file:///home/alex, file:///home/alex/eth/thermo2, file:///home/alex/eth/wuf2, file:///home/alex/eth/innoproz, file:///home/alex/bks/Magazines/Death to the World
|
history=file:///home/alex, file:///home/alex/eth/thermo2, file:///home/alex/eth/wuf2, file:///home/alex/eth/innoproz, file:///home/alex/bks/Magazines/Death to the World, file:///home/alex/eth/fluid1
|
||||||
lastVisited=file:///home/alex/bks/Magazines/Death to the World
|
lastVisited=file:///home/alex/eth/fluid1
|
||||||
qtVersion=5.15.0
|
qtVersion=5.15.0
|
||||||
shortcuts=file:, file:///home/alex
|
shortcuts=file:, file:///home/alex
|
||||||
sidebarWidth=82
|
sidebarWidth=82
|
||||||
|
@ -1,2 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
[ $( pgrep -c openconnect ) -eq 0 ] &&( dmenupass "Password for ETH-VPN:" | sudo openconnect -g student-net -u abocken@student-net.ethz.ch --passwd-on-stdin sslvpn.ethz.ch ) || ( sudo pkill openconnect; notify-send "ETH VPN" "ETH VPN disconnected")
|
user="abocken@student-net.ethz.ch"
|
||||||
|
password_path="ETH/VPN"
|
||||||
|
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
||||||
|
pass "$password_path" | sudo openconnect -g student-net -u "$user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||||
|
sleep 4
|
||||||
|
if [ $(pgrep -c openconnect) -eq 1 ]; then
|
||||||
|
notify-send "ETH VPN" "ETH VPN connected" #implement an actual check here
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user