blob: 93013a126261faf4586f4121899ab388a07dc92e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
case "$1" in
start)
shift
curl -i -sS -X POST -H "Content-Type: application/json" "http://localhost:9000/api/submit" \
-d "{\"url\": \"$1\"}"
;;
cancel)
shift
curl -i -sS -X POST "http://localhost:9000/api/$1/cancel"
;;
logs)
shift
curl -i -sS -X GET "http://localhost:9000/api/$1/logs"
;;
*)
echo "invalid command $1" >&2
exit 2
;;
esac
|