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.

log2ram.initd 563 B

1234567891011121314151617181920212223242526272829303132
  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 minimize writes to disk."
  5. # Command is available when the service is started
  6. extra_started_commands="write"
  7. depend() {
  8. after localmount
  9. before logger
  10. }
  11. start() {
  12. ebegin "Starting Log2Ram"
  13. /usr/local/bin/log2ram start
  14. eend $?
  15. }
  16. stop() {
  17. ebegin "Stopping Log2Ram"
  18. /usr/local/bin/log2ram stop
  19. eend $?
  20. }
  21. write() {
  22. ebegin "Syncing logs to disk"
  23. /usr/local/bin/log2ram write
  24. eend $?
  25. }