Wrapper script for ssh which keeps urxvt open to display errors

This commit is contained in:
madmaurice 2015-06-08 16:46:15 +02:00
parent dff63d2dde
commit e2fc359cdf
2 changed files with 11 additions and 1 deletions

View file

@ -49,7 +49,7 @@ case "$(menu timer screenshot wallpaper wicd ncmpcpp ssh zomnet power)" in
ssh)
host=$(menu `./ssh_hosts.sh`)
if [ -n "$host" ]; then
exec urxvt -e ssh $host
exec urxvt -e $HOME/.config/scripts/sshw.sh $host
fi
;;
zomnet)

10
scripts/sshw.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
# SSH Wrapper
# Shows if return value of ssh is != 0
ssh $@
ret=$?
if [ "$ret" != "0" ]; then
echo "Exit value: $ret"
while true; do sleep 5; done
fi