diff options
Diffstat (limited to 'scripts/epgh-request')
-rwxr-xr-x | scripts/epgh-request | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/epgh-request b/scripts/epgh-request new file mode 100755 index 0000000..ad6a72f --- /dev/null +++ b/scripts/epgh-request @@ -0,0 +1,28 @@ + +if [ -z "$1" ]; then + echo "Usage: epgh-request <request> [ <user> <passwd> ]" + exit +fi + +#--------- +# login + +. epgh-login "$2" "$3" + +#--------- +# work + +# RES=$(wget -q -O - "$EPGD_HOST:$EPGD_PORT/sid$EPG_HTTPD_SESSION/data/$1") + +RES=$(curl -s "$EPGD_HOST:$EPGD_PORT/sid$EPG_HTTPD_SESSION/data/$1") + +echo $RES | json_pp + +if [ $? -ne 0 ]; then + echo "Got: $RES" +fi + +#--------- +# logout + +epgh-login logout |