diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-04 14:55:24 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-04 14:55:24 +0100 |
commit | 1f72c4442d54868eb7a5355eeeef8dcaf1677c4e (patch) | |
tree | e5f50f5acb3d9332a60bf72ab73a9e6412ade720 | |
parent | 695e54a33a9d69867ccf549d20be4cc7ef6e6ef3 (diff) |
Added check_ssh function
-rw-r--r-- | etc/functions/check_ssh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/functions/check_ssh b/etc/functions/check_ssh new file mode 100644 index 0000000..26ee9fa --- /dev/null +++ b/etc/functions/check_ssh @@ -0,0 +1,6 @@ +## vim:ft=zsh +if [[ $(ssh $1 'echo foo' 2> /dev/null < /dev/null ) == foo ]] { + return 0 +} else { + return 1 +} |