blob: ad6a72f99d7b8d692dd09b29b1c0bd7e5a362705 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
|