Wrapper script for ssh which keeps urxvt open to display errors
This commit is contained in:
parent
dff63d2dde
commit
e2fc359cdf
2 changed files with 11 additions and 1 deletions
|
@ -49,7 +49,7 @@ case "$(menu timer screenshot wallpaper wicd ncmpcpp ssh zomnet power)" in
|
||||||
ssh)
|
ssh)
|
||||||
host=$(menu `./ssh_hosts.sh`)
|
host=$(menu `./ssh_hosts.sh`)
|
||||||
if [ -n "$host" ]; then
|
if [ -n "$host" ]; then
|
||||||
exec urxvt -e ssh $host
|
exec urxvt -e $HOME/.config/scripts/sshw.sh $host
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
zomnet)
|
zomnet)
|
||||||
|
|
10
scripts/sshw.sh
Executable file
10
scripts/sshw.sh
Executable 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
|
Loading…
Reference in a new issue