diff options
author | dakkar <dakkar@thenautilus.net> | 2018-03-03 14:06:06 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2018-03-03 14:06:06 +0000 |
commit | 7d9f14e996e3c41c8f994632fbd6c1aef6035c64 (patch) | |
tree | 482627edf7c7b12c2063e1bc4c1cba262568c463 | |
parent | fix for newer Cro (diff) | |
download | Ultramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.tar.gz Ultramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.tar.bz2 Ultramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.zip |
helper 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}" |