metalog.initd 509 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/openrc-run
  2. # Copyright 1999-2018 Gentoo Authors
  3. # Distributed under the terms of the GNU General Public License v2
  4. supervisor=supervise-daemon
  5. command="metalog"
  6. extra_started_commands="buffer unbuffer"
  7. depend() {
  8. need localmount
  9. use clock hostname
  10. after bootmisc
  11. provide logger
  12. }
  13. buffer() {
  14. ebegin "Enabling log buffering"
  15. supervisor-daemon "${command}" --signal USR2
  16. eend ${?}
  17. }
  18. unbuffer() {
  19. ebegin "Disabling log buffering"
  20. supervisor-daemon "${command}" --signal USR1
  21. eend ${?}
  22. }