您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

log2ram.initd 562 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. need 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. }