1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
6 PIDF
=/var
/run
/pure-ftpd.pid
7 PROG
=/usr
/sbin
/pure-ftpd
14 config_get_bool _val
"$section" "$option" '0'
15 [ "$_val" -gt 0 ] && append args
"$3"
23 config_get _val
"$section" "$option"
24 [ -n "$_val" ] && append args
"$3 $_val"
31 append_string
"$section" port
"-S"
32 append_bool
"$section" noanonymous
"-E"
33 append_bool
"$section" chrooteveryone
"-A"
34 append_string
"$section" maxclientsperip
"-c"
35 append_string
"$section" maxclientsnumber
"-C"
36 append_string
"$section" peruserlimits
"-y"
37 append_string
"$section" umask "-U"
38 append_string
"$section" authentication
"-l"
39 config_get_bool
"enabled" "$section" "enabled" '1'
40 [ "$enabled" -gt 0 ] && $SSD -S -p $PIDF -q -x $PROG -- -g $PIDF -B $args
44 killall pure-ftpd
2>&1 > /dev
/null
46 # FIXME: Fix Busybox start-stop-daemon to work with multiple PIDs
51 config_load
"pure-ftpd"
52 config_foreach start_service
"pure-ftpd"
56 config_load
"pure-ftpd"
57 config_foreach stop_service
"pure-ftpd"