#!/bin/sh /etc/rc.common
# Copyright (C) 2013-2017 OpenWrt.org

START=60
USE_PROCD=1

start_service() {
	procd_open_instance

	config_load prometheus-node-exporter-lua.main
	config_get bind "main" listen_address ::1
	config_get port "main" listen_port 9100

	procd_set_param command /usr/bin/prometheus-node-exporter-lua
	procd_append_param command --port ${port}
	procd_append_param command --bind ${bind}

	procd_close_instance
}
