packages/fprobe-ulog: fix whitespaces
[packages.git] / net / httptunnel / files / httptunnel.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007 OpenWrt.org
3 START=70
4 BIN=hts
5
6 start_httptunnel() {
7     local section="$1"    
8     
9     config_get destination "$section" destination
10     config_get sourceport "$section" sourceport 
11     
12     echo start httptunnel: dest: "$destination", src: "$sourceport"
13     
14     $BIN --forward-port "$destination" "$sourceport"
15 }
16
17
18 start() {
19     config_load httptunnel
20     config_foreach start_httptunnel httptunnel
21 }
22
23 stop() {
24         ps aux | grep hts |  awk '{print }' | \
25             xargs kill 2> /dev/null
26 }
27