Correct Fastnet hostname, add VNC shortcut to Mac

This commit is contained in:
John Mertz 2021-07-27 01:20:28 -04:00 committed by John Mertz
parent 87a9d29298
commit 4a6a59029d
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 6 additions and 3 deletions

View File

@ -1,19 +1,20 @@
#!/bin/bash #!/bin/bash
res=$(echo "john.me.tz|root@john.me.tz|t470s.lan.john.me.tz|shb.ng|\ res=$(echo "john.me.tz|root@john.me.tz|t470s.lan.john.me.tz|shb.ng|\
kipary.mailcleaner.net|media.lan.john.me.tz|pipcam.lan.john.me.tz|\ kipary.fastnet.ch|media.lan.john.me.tz|pipcam0.lan.john.me.tz|\
therm.lan.john.me.tz|hud.lan.john.me.tz|vm.lan.john.me.tz" | \ therm.lan.john.me.tz|hud.lan.john.me.tz|vm.lan.john.me.tz|mac.lan.john.me.tz" | \
rofi -sep "|" -dmenu -i -p 'P ' "" -columns 1 -rows 1 -width 45 -l 1 -config \ rofi -sep "|" -dmenu -i -p 'P ' "" -columns 1 -rows 1 -width 45 -l 1 -config \
/home/jpm/.config/rofi/config -hide-scrollbar -eh 1 -location 0 -yoffset 0 \ /home/jpm/.config/rofi/config -hide-scrollbar -eh 1 -location 0 -yoffset 0 \
-padding 12 -opacity 100 -auto-select -no-fullscreen) -padding 12 -opacity 100 -auto-select -no-fullscreen)
echo $res > /home/jpm/.last_ssh_shortcut
if [ $res = "john.me.tz" ]; then if [ $res = "john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs w'
elif [ $res = "root@john.me.tz" ]; then elif [ $res = "root@john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs r'
elif [ $res = "shb.ng" ]; then elif [ $res = "shb.ng" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs s'
elif [ $res = "kipary.mailcleaner.net" ]; then elif [ $res = "kipary.fastnet.ch" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs d'
elif [ $res = "camera.lan.john.me.tz" ]; then elif [ $res = "camera.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs c'
@ -29,5 +30,7 @@ elif [ $res = "therm.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs t'
elif [ $res = "vm.lan.john.me.tz" ]; then elif [ $res = "vm.lan.john.me.tz" ]; then
/usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v' /usr/bin/urxvt -e /bin/bash -c '/home/jpm/scripts/sshs v'
elif [ $res = "mac.lan.john.me.tz" ]; then
/usr/bin/gvncviewer 192.168.2.10 >> /home/jpm/macos
fi fi
exit 0 exit 0