1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007 OpenWrt.org
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" interface "-i"
32 append_string "$section" pcap_file "-r"
33 append_string "$section" timeout "-t"
34 append_string "$section" max_flows "-m"
35 append_string "$section" host_port "-n"
36 append_string "$section" pid_file "-p"
37 append_string "$section" control_socket "-c"
38 append_string "$section" export_version "-v"
39 append_string "$section" hoplimit "-L"
40 append_string "$section" tracking_level "-T"
41 append_bool "$section" track_ipv6 "-6"
42 config_get_bool "enabled" "$section" "enabled" '1'
43 [ "$enabled" -gt 0 ] && $BIN_F $args
48 config_get pidfile "$section" pid_file
49 config_get control_socket "$section" control_socket
51 [ -n "$pid_file" ] || pid_file="$pidfile"
53 $SSD -K -p $pid_file -q && rm -f $control_socket
60 config_foreach start_service $NAME
65 config_foreach stop_service $NAME