summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-02-04 14:55:24 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-02-04 14:55:24 +0100
commit1f72c4442d54868eb7a5355eeeef8dcaf1677c4e (patch)
treee5f50f5acb3d9332a60bf72ab73a9e6412ade720 /etc
parent695e54a33a9d69867ccf549d20be4cc7ef6e6ef3 (diff)
Added check_ssh function
Diffstat (limited to 'etc')
-rw-r--r--etc/functions/check_ssh6
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
+}