#!/bin/sh /etc/rc.common
# Copyright (C) 2009 DrayTek Corp.
START=51

start() {
PROTO=$(uci -q get network.wan.proto)
if [ "$PROTO" != "LTE" ]; then
  exit
fi

#echo "starting lte_d........"

drv_exist=$(lsmod | grep [l]te_drv)
if [ -n "$drv_exist" ]; then
    app_exist=$(ps | grep [l]te_d)
    if [ "$app_exist" = "" ]; then
      lte_d &
    fi
fi    
}

stop() {
#echo "stop lte_d........"
    killall -q lte_d
}

restart() {
#echo "restart lte_d..."
stop
    lte_d &
}