diff options
author | tv <tv@xso> | 2011-08-13 15:49:43 +0200 |
---|---|---|
committer | tv <tv@xso> | 2011-08-13 15:49:43 +0200 |
commit | c36f72a019abcd22fca3dc550e1a239c1d161f1f (patch) | |
tree | ab496cb5272924f142ab1c543625dfb489db5d23 /cholerab | |
parent | 541620dc51862d588a2bdfea9b84dbf9bf21bf73 (diff) |
cholerab cnot: be verbose on demand only
Diffstat (limited to 'cholerab')
-rwxr-xr-x | cholerab/knut/clients/cnot/index | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cholerab/knut/clients/cnot/index b/cholerab/knut/clients/cnot/index index d17329f4..f276dd25 100755 --- a/cholerab/knut/clients/cnot/index +++ b/cholerab/knut/clients/cnot/index @@ -2,7 +2,7 @@ # # cnot - cholerab live command line notification client, bitch! # -# usage: cnot hostname message... +# usage: [verbose=yes] cnot hostname [message...] # set -euf @@ -11,6 +11,12 @@ port=42101 params="$*" -exec curl -vsS -X PUT --data-binary @- "http://$host:$port" <<EOF +flags=-sS + +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 |