abrt-2.0.12-r1-init 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2012 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. description="Automated crash detection service"
  5. depend() {
  6. need dbus logger
  7. }
  8. start() {
  9. ebegin "Starting abrtd"
  10. start-stop-daemon --start --quiet --pidfile /var/run/abrt/abrtd.pid \
  11. --exec /usr/sbin/abrtd -- ${ABRTD_OPTS}
  12. eend $?
  13. if [[ "${START_VMCORE}" = "yes" ]]; then
  14. ebegin "Running abrt-harvest-vmcore"
  15. /usr/sbin/abrt-harvest-vmcore
  16. eend $?
  17. fi
  18. if [[ "${START_CCPP}" = "yes" ]]; then
  19. ebegin "Installing abrt-ccpp hook"
  20. /usr/sbin/abrt-install-ccpp-hook install
  21. eend $?
  22. fi
  23. if [[ "${START_OOPS}" = "yes" ]]; then
  24. ebegin "Starting abrt-dump-oops"
  25. start-stop-daemon --start --quiet \
  26. --pidfile /var/run/abrt/abrt-dump-oops.pid \
  27. --make-pidfile --background \
  28. --exec /usr/bin/abrt-watch-log -- \
  29. -F "`/usr/bin/abrt-dump-oops -m`" ${OOPS_WATCH_LOG} -- \
  30. /usr/bin/abrt-dump-oops ${OOPS_DUMP_OPTS}
  31. eend $?
  32. fi
  33. if [[ "${START_XORG}" = "yes" ]]; then
  34. ebegin "Starting abrt-dump-xorg"
  35. start-stop-daemon --start --quiet \
  36. --pidfile /var/run/abrt/abrt-dump-xorg.pid \
  37. --make-pidfile --background \
  38. --exec /usr/bin/abrt-watch-log -- \
  39. -F "`/usr/bin/abrt-dump-xorg -m`" ${XORG_WATCH_LOG} -- \
  40. /usr/bin/abrt-dump-xorg ${XORG_DUMP_OPTS}
  41. eend $?
  42. fi
  43. }
  44. stop() {
  45. if [[ "${START_XORG}" = "yes" ]]; then
  46. ebegin "Stopping abrt-dump-xorg"
  47. start-stop-daemon --stop --quiet \
  48. --pidfile /var/run/abrt/abrt-dump-xorg.pid
  49. eend $?
  50. fi
  51. if [[ "${START_OOPS}" = "yes" ]]; then
  52. ebegin "Stopping abrt-dump-oops"
  53. start-stop-daemon --stop --quiet \
  54. --pidfile /var/run/abrt/abrt-dump-oops.pid
  55. eend $?
  56. fi
  57. if [[ "${START_CCPP}" = "yes" ]]; then
  58. ebegin "Uninstalling abrt-ccpp hook"
  59. /usr/sbin/abrt-install-ccpp-hook uninstall
  60. eend $?
  61. fi
  62. ebegin "Stopping abrtd"
  63. start-stop-daemon --stop --quiet --pidfile /var/run/abrt/abrtd.pid
  64. eend $?
  65. }