6ac886805741ba6aa6a817fccb8eca0c1f8b1515
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
10 config_get_bool _loctmp
"$section" "$option"
11 [ "$_loctmp" -gt 0 ] && append args
"$value"
19 config_get _loctmp
"$section" "$option"
20 [ -z "$_loctmp" ] && return 0
21 append args
"$switch $_loctmp"
28 append_boot
"$cfg" useipv4
"-4"
29 append_bool
"$cfg" useipv6
"-6"
30 append_bool
"$cfg" emptystart
"--empty-start"
31 append_parm
"$cfg" port
"-p"
32 append_parm
"$cfg" directory
"-d"
33 append_parm
"$cfg" maxpeers
"--max-peers"
34 append_parm
"$cfg" maxuploads
"--max-uploads"
35 append_parm
"$cfg" maxkbin
"--bw-in"
36 append_parm
"$cfg" maxkbout
"--bw-out"
37 config_get directory
"$cfg" directory
44 config_foreach btpd btpd
52 config_foreach btpd btpd
54 [ -d $directory ] && args
="-d $directory "
57 while btcli
$args kill ; do
62 killall
/usr
/bin
/btpd
> /dev
/null
2>&1