summaryrefslogtreecommitdiffstats
path: root/cholerab/knut/clients/cnot/index
diff options
context:
space:
mode:
authorChinaman <root@chinaman>2011-09-06 19:47:58 +0200
committerChinaman <root@chinaman>2011-09-06 19:47:58 +0200
commit108f3616e3f4958752d881192ef29e5fc4c2b045 (patch)
tree3c67478c852265219b72e6e1b05467d7065b7ba8 /cholerab/knut/clients/cnot/index
parentb2d65500160bcdf7abb2bf985f7da582b810e25c (diff)
parentc3bc5a6d16868c121aca780f3109155797b51d76 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'cholerab/knut/clients/cnot/index')
-rwxr-xr-xcholerab/knut/clients/cnot/index22
1 files changed, 22 insertions, 0 deletions
diff --git a/cholerab/knut/clients/cnot/index b/cholerab/knut/clients/cnot/index
new file mode 100755
index 00000000..fcbef73e
--- /dev/null
+++ b/cholerab/knut/clients/cnot/index
@@ -0,0 +1,22 @@
+#! /bin/sh
+#
+# cnot - cholerab live command line notification client, bitch!
+#
+# usage: [verbose=yes] cnot hostname [message...]
+#
+set -euf
+
+host="$1"; shift
+port=42101
+
+params="$*"
+
+flags=${curl_flags--fsS}
+
+if test "${verbose-no}" != no; then
+ flags="${flags+$flags }-v"
+fi
+
+exec curl $flags -X PUT --data-binary @- "http://$host:$port" <<EOF
+{"method":"clive","params":"$params","id":null}
+EOF