summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-03-03 14:06:06 +0000
committerdakkar <dakkar@thenautilus.net>2018-03-03 14:06:06 +0000
commit7d9f14e996e3c41c8f994632fbd6c1aef6035c64 (patch)
tree482627edf7c7b12c2063e1bc4c1cba262568c463
parentfix for newer Cro (diff)
downloadUltramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.tar.gz
Ultramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.tar.bz2
Ultramarine-7d9f14e996e3c41c8f994632fbd6c1aef6035c64.zip
helper to call ultramarine
-rwxr-xr-xcall-ultramarine11
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}"