| 1 | #!/sbin/openrc-run |
| 2 | |
| 3 | : ${command_args:="-bird.v2 -format.description-labels -format.new"} |
| 4 | |
| 5 | description="Metric exporter for bird routing daemon" |
| 6 | name=bird_exporter |
| 7 | command=/usr/bin/bird_exporter |
| 8 | command_user=bird_exporter:bird |
| 9 | command_background=yes |
| 10 | pidfile=/run/bird_exporter/bird_exporter.pid |
| 11 | |
| 12 | depend() { |
| 13 | need bird |
| 14 | use logger |
| 15 | after firewall |
| 16 | } |
| 17 | |
| 18 | start_pre() { |
| 19 | checkpath --directory --mode 0775 $(dirname $pidfile) |
| 20 | } |