blob: 6c846189bbb5f984cbb748eb04b469573923574e (
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
|
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=70
BIN=hts
start_httptunnel() {
local section="$1"
config_get destination "$section" destination
config_get sourceport "$section" sourceport
echo start httptunnel: dest: "$destination", src: "$sourceport"
$BIN --forward-port "$destination" "$sourceport"
}
start() {
config_load httptunnel
config_foreach start_httptunnel httptunnel
}
stop() {
ps aux | grep hts | awk '{print }' | \
xargs kill 2> /dev/null
}
|