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

START=30
USE_PROCD=1

#validate_smartchargingd_section() {
#}

#smartchargingd_config() {
#}

reload_service() {
	config_load smartchargingd
}

service_triggers()
{
	procd_add_reload_trigger "smartchargingd"
}

start_service() {
	procd_open_instance
	procd_set_param command /usr/sbin/smartchargingd

	#respawn automatically if something died, be careful
	procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-2} ${respawn_retry:-0}
	#reload
	procd_set_param file /etc/config/smartchargingd
	#log printfs
	procd_set_param stdout 1
	procd_set_param stderr 1
	procd_set_param user root

	procd_close_instance
}

stop_service() {
supervisor_unsubscriber smartchargingd
}

