Merge pull request #5088 from hbl0307106015/libtalloc
[feed/packages.git] / utils / prometheus-node-exporter-lua / files / etc / init.d / prometheus-node-exporter-lua
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2013-2017 OpenWrt.org
3
4 START=60
5 USE_PROCD=1
6
7 start_service() {
8 procd_open_instance
9
10 config_load prometheus-node-exporter-lua.main
11 config_get bind "main" listen_address ::1
12 config_get port "main" listen_port 9100
13
14 procd_set_param command /usr/bin/prometheus-node-exporter-lua
15 procd_append_param command --port ${port}
16 procd_append_param command --bind ${bind}
17
18 procd_set_param stdout 1
19 procd_set_param stderr 1
20
21 procd_close_instance
22 }