Lines 38-44
load_rc_config $name
Link Here
|
38 |
pidfile=/var/run/node_exporter.pid |
38 |
pidfile=/var/run/node_exporter.pid |
39 |
command="/usr/sbin/daemon" |
39 |
command="/usr/sbin/daemon" |
40 |
procname="%%PREFIX%%/bin/node_exporter" |
40 |
procname="%%PREFIX%%/bin/node_exporter" |
41 |
command_args="-p ${pidfile} /usr/bin/env ${procname} \ |
41 |
command_args="-p ${pidfile} -T ${name} \ |
|
|
42 |
/usr/bin/env ${procname} \ |
42 |
--web.listen-address=${node_exporter_listen_address} \ |
43 |
--web.listen-address=${node_exporter_listen_address} \ |
43 |
--collector.textfile.directory=${node_exporter_textfile_dir} \ |
44 |
--collector.textfile.directory=${node_exporter_textfile_dir} \ |
44 |
${node_exporter_args}" |
45 |
${node_exporter_args}" |
Lines 48-57
start_precmd=node_exporter_startprecmd
Link Here
|
48 |
node_exporter_startprecmd() |
49 |
node_exporter_startprecmd() |
49 |
{ |
50 |
{ |
50 |
if [ ! -e ${pidfile} ]; then |
51 |
if [ ! -e ${pidfile} ]; then |
51 |
install -o ${node_exporter_user} -g ${node_exporter_group} /dev/null ${pidfile}; |
52 |
install \ |
|
|
53 |
-o ${node_exporter_user} \ |
54 |
-g ${node_exporter_group} \ |
55 |
/dev/null ${pidfile}; |
52 |
fi |
56 |
fi |
53 |
if [ ! -d ${node_exporter_textfile_dir} ]; then |
57 |
if [ ! -d ${node_exporter_textfile_dir} ]; then |
54 |
install -d -o ${node_exporter_user} -g ${node_exporter_group} -m 1755 ${node_exporter_textfile_dir} |
58 |
install \ |
|
|
59 |
-d \ |
60 |
-o ${node_exporter_user} \ |
61 |
-g ${node_exporter_group} \ |
62 |
-m 1755 \ |
63 |
${node_exporter_textfile_dir} |
55 |
fi |
64 |
fi |
56 |
} |
65 |
} |
57 |
|
66 |
|