#!/bin/sh /etc/rc.common
# Copyright (C) 2022 DPTechnics BV

#start after bluetooth-meshd (62)
START=64
USE_PROCD=1
PROG=/usr/sbin/bluemesh-server

start_service() {
	mkdir -p /etc/libbluemesh
        procd_open_instance
        procd_set_param command "$PROG" /etc/config/bluemesh-server
        procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
        procd_set_param file /var/run/bluetooth-meshd.pid
        procd_close_instance
}
