diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2017-07-11 06:36:33 +0200 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2017-07-11 06:36:33 +0200 |
commit | 0455a7401f9f0f9bfad82c5ddf04f7dd70b0b852 (patch) | |
tree | 819bc150cb62c8eb344656086bbb52892f5288b8 /ll-store-binding/store.sh | |
parent | 66b90d26cfd555b2aa5fef67d31e539a70256719 (diff) |
first somewhat working version.
Change-Id: I3101dc6b8add87eccac3bbf177b1320137f72463
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'll-store-binding/store.sh')
-rwxr-xr-x | ll-store-binding/store.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ll-store-binding/store.sh b/ll-store-binding/store.sh new file mode 100755 index 0000000..d2dfbc7 --- /dev/null +++ b/ll-store-binding/store.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +case "$1" in + "get") + if [ "$#" -ne "4" ]; then + echo "Usage: store get <user> <app> <tag>" + exit 1 + fi + curl -v "http://localhost:9001/api/ll-store/get?username=$2&appname=$3&tagname=$4&token=" + ;; + "set") + if [ "$#" -ne "5" ]; then + echo "Usage: store get <user> <app> <tag> <value>" + exit 1 + fi + curl -v "http://localhost:9001/api/ll-store/set?username=$2&appname=$3&tagname=$4&value=$5&token=" + ;; + *) + echo "Usage: store <action> <user> <app> <tag> <value>" + echo " Action can be 'get' or 'set'." + ;; +esac + |