File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /sbin/openrc-run
2+ # Distributed under the terms of the GNU General Public License v2
3+
4+ description=" Prometheus JSON exporter"
5+
6+ command=" json_exporter"
7+ config_file=" /etc/json_exporter/config.toml"
8+ command_args=" -a 0.0.0.0 ${config_file} " # change if you don't want it listening on all interfaces
9+ pidfile=${pidfile:- " /run/${RC_SVCNAME} .pid" }
10+ command_background=" true" # It stays in the foreground
11+ log_dir=" /var/log/${RC_SVCNAME} "
12+ start_stop_daemon_args=" --stdout ${log_dir} /${RC_SVCNAME} .log --stderr ${log_dir} /${RC_SVCNAME} .log"
13+
14+ depend () {
15+ after net
16+ }
17+
18+
19+ start_pre () { # This dir should be created by the ebuild
20+ checkpath -q -d -m 0755 " $log_dir "
21+ }
22+
23+ reload () {
24+ einfo " Reloading ${RC_SVCNAME} "
25+ ebegin " Sending SIGHUP to ${RC_SVCNAME} "
26+ start-stop-daemon --signal HUP --pidfile " ${pidfile} "
27+ eend $?
28+ }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " json_exporter"
7- version = " 1.0.0 "
7+ version = " 1.0.1 "
88authors = [
99 {
name =
" Desultory" ,
email =
" [email protected] " },
1010]
You can’t perform that action at this time.
0 commit comments