You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
538 B

  1. #!/sbin/openrc-run
  2. # Init-Skript for log2ram
  3. # This skript is designed to work on Gentoo Linux with OpenRC
  4. description="Store logfiles in RAM to mimimize writes to disk."
  5. . /etc/log2ram.conf # Include configuration of log2ram
  6. depend() {
  7. need localmount
  8. before logger
  9. }
  10. start() {
  11. ebegin "Starting Log2Ram"
  12. /usr/local/bin/log2ram start
  13. eend $?
  14. }
  15. stop() {
  16. ebegin "Stopping Log2Ram"
  17. /usr/local/bin/log2ram stop
  18. eend $?
  19. }
  20. restart() {
  21. ebegin "Syncing logs to disk"
  22. /usr/local/bin/log2ram write
  23. eend $?
  24. }