blob: 3350efceee27e3a416b18cf8237c234272095ab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh -e
. /www/service/cgi-bin/common.sh
echo -e 'Status: 200 OK\r
Content-Type: application/json\r
\r
['
p2ptbl show /tmp/p2ptbl/service \
| sed '
s/^/{"url": "/
s/\t/", "expire": "/
s/\t/", "source": "/
s/\t/", "class": "/
s/\t/", "desc": "/
s/\t/", "custom1": "/
s/\t/", "custom2": "/
s/\t/", "custom3": "/
s/$/"},/
$s/,$//'
echo ']'
|