blob: 72afb94b8afdcb9f9fcde26fea10a2b4c8b0eb46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
. /usr/share/libubox/jshn.sh
(
json_init
json_add_string ip "$1"
json_add_int port "$2"
json_add_int inner_port "$4"
json_add_string protocol "$5"
json_dump > /var/run/natmap/$PPID.json
)
[ -n "${NOTIFY_SCRIPT}" ] && {
export -n NOTIFY_SCRIPT
exec "${NOTIFY_SCRIPT}" "$@"
}
|