1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2009-2011 OpenWrt.org
6 PIDF
=/var
/run
/$NAME.pid
11 config_get device core device
12 config_get port core port
13 config_get_bool listen_globally core listen_globally
14 config_get_bool enabled core enabled
15 [ "$enabled" != "1" ] && exit
16 logger
-t "$NAME" "Starting..."
17 [ ! -c "$device" ] && {
18 logger
-t "$NAME" "Unable to find device $device. Exiting."
21 [ "$listen_globally" != "0" ] && append args
"-G"
22 $PROG -n -P $PIDF -S $port $args $device
26 logger
-t "$NAME" "Stopping..."