diff options
Diffstat (limited to 'call-ultramarine')
-rwxr-xr-x | call-ultramarine | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/call-ultramarine b/call-ultramarine new file mode 100755 index 0000000..3e7043f --- /dev/null +++ b/call-ultramarine @@ -0,0 +1,11 @@ +#!/bin/bash + +password="${ULTRAMARINE_PASSWORD:-sesame}" +enc_password="$(hexdump --format '1/1 "%02x"' <<<$password)" +enc_password="${enc_password%0a}" + +method="${1:?please pass a method}" +shift; +IFS='&';args="$*" + +curl -v "http://192.168.1.145:8080/rest/${method}?v=1.12.0&c=myapp&u=me&p=enc:${enc_password}&${args}" |