fixed some an issue on the html UI.
[apps/agl-service-data-persistence.git] / ll-store-binding / store.sh
1 #!/bin/sh
2
3 case "$1" in
4         "get")
5                 if [ "$#" -ne "4" ]; then
6                         echo "Usage: store get <user> <app> <tag>"
7                         exit 1
8                 fi
9                 curl -v "http://localhost:9001/api/ll-store/get?username=$2&appname=$3&tagname=$4&token="
10                 ;;
11         "set")
12                 if [ "$#" -ne "5" ]; then
13                         echo "Usage: store get <user> <app> <tag> <value>"
14                         exit 1
15                 fi
16                 curl -v "http://localhost:9001/api/ll-store/set?username=$2&appname=$3&tagname=$4&value=$5&token="
17                 ;;
18         *)
19                 echo "Usage: store <action> <user> <app> <tag> <value>"
20                 echo "    Action can be 'get' or 'set'."
21                 ;;
22 esac
23