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

START=98
STOP=11

USE_PROCD=1
PROG=/usr/sbin/deagent

service_running() {
	ubus -t 2 wait_for wifi ieee1905 ieee1905.map
}

start_service() {
	procd_open_instance
	procd_set_param command "$PROG" "-d" "-t 10"
	#procd_set_param stdout 1
	#procd_set_param stderr 1
	procd_set_param respawn
	procd_close_instance
}

reload_service() {
	stop
	start
}

service_triggers()
{
	procd_add_reload_trigger wireless
}
