summaryrefslogtreecommitdiff
path: root/build
blob: d4f92c1d07627d7d08b9d6bb55c7ae5270f122ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

case "$1" in
    start)
	shift
	curl -i -X POST -H "Content-Type: application/json" "http://localhost:9000/api/submit" \
	     -d "{\"url\": \"$1\"}"
	;;
    cancel)
	shift
	curl -i -X POST "http://localhost:9000/api/$1/cancel"
	;;
    *)
	echo "invalid command $1" >&2
	exit 2
	;;
esac