Compare commits
No commits in common. "18d1bca8079fa950a3d80c025442eeec564ff41d" and "57798d0509d184389f18247821c7b63725f8d653" have entirely different histories.
18d1bca807
...
57798d0509
@ -95,7 +95,7 @@
|
|||||||
"sync_speed_attempts": 3,
|
"sync_speed_attempts": 3,
|
||||||
"sync_speed_time": 1000,
|
"sync_speed_time": 1000,
|
||||||
"thumbnail_enable": true,
|
"thumbnail_enable": true,
|
||||||
"thumbnail_jellyscrub": true,
|
"thumbnail_jellyscrub": false,
|
||||||
"thumbnail_osc_builtin": true,
|
"thumbnail_osc_builtin": true,
|
||||||
"thumbnail_preferred_size": 320,
|
"thumbnail_preferred_size": 320,
|
||||||
"transcode_dolby_vision": true,
|
"transcode_dolby_vision": true,
|
||||||
|
@ -3,18 +3,21 @@ PASS_DIR=Misc/SaferVPN
|
|||||||
USER='alexander@bocken.org'
|
USER='alexander@bocken.org'
|
||||||
ETH_user="abocken@student-net.ethz.ch"
|
ETH_user="abocken@student-net.ethz.ch"
|
||||||
ETH_password_path="ETH/VPN"
|
ETH_password_path="ETH/VPN"
|
||||||
ETH_OTP_path="OTP/nETHz"
|
|
||||||
|
|
||||||
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -i -p 'connect with which vpn server?' -l 10)"
|
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -i -p 'connect with which vpn server?' -l 10)"
|
||||||
[ -z "$choice" ] && exit
|
[ -z "$choice" ] && exit
|
||||||
if [ "$choice" = "ETH" ]; then
|
if [ "$choice" = "ETH" ]; then
|
||||||
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
if [ $(pgrep -c openconnect) -eq 0 ]; then
|
||||||
printf "%s\n%s\n" "$(pass "$ETH_password_path")" "$(pass otp "$ETH_OTP_path")" | sudo openconnect --useragent=AnyConnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
transmission-remote -u 0
|
||||||
|
transmission-remote -d 0
|
||||||
|
pass "$ETH_password_path" | sudo openconnect -g student-net -u "$ETH_user" --passwd-on-stdin sslvpn.ethz.ch &
|
||||||
if ping -c 3 -W 3 -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
|
||||||
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
sudo pkill openconnect && notify-send "ETH VPN" "ETH VPN disconnected"
|
||||||
|
transmission-remote -U
|
||||||
|
transmission-remote -D
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printf '%s\n%s\n' "$USER" "$(pass $PASS_DIR)" > /tmp/tmp_pass
|
printf '%s\n%s\n' "$USER" "$(pass $PASS_DIR)" > /tmp/tmp_pass
|
||||||
|
Loading…
Reference in New Issue
Block a user