#!/bin/sh /etc/rc.common

START=99

start() {
    local isClientLogEnable=`uci -q get logger.setting.isClientLogEnable`
    if [ -n ${isClientLogEnable} -a "${isClientLogEnable}" == "on" ]; then
        local id=`pgrep -f "/usr/sbin/client_log -s"`
        if [ -z ${id} ]; then
            /usr/sbin/client_log -s &
        fi
    fi
}

stop() {
    /usr/sbin/ebtables -F
    pgrep -f "/usr/sbin/client_log -s" | xargs kill -9
}

restart() {
    stop
    start
}