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

START=19
USE_PROCD=1

boot() {
	. /lib/config/uci.sh
	uci_toggle_state mwan3 globals enabled "1"
	mwan3_boot=1
	rc_procd start_service
}

reload_service() {
	/usr/sbin/mwan3 restart
}

start_service() {
	[ -n "${mwan3_boot}" ] && return 0
	/usr/sbin/mwan3 start
}

stop_service() {
	/usr/sbin/mwan3 stop
}

service_triggers() {
	procd_add_reload_trigger 'mwan3'
}
