1
0

sysklogd 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin sysklogd
  4. #
  5. # Description : Sysklogd loader
  6. #
  7. # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
  8. # DJ Lucas - dj@linuxfromscratch.org
  9. # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
  10. #
  11. # Version : LFS 7.0
  12. #
  13. ########################################################################
  14. ### BEGIN INIT INFO
  15. # Provides: $syslog
  16. # Required-Start: localnet
  17. # Should-Start:
  18. # Required-Stop: $local_fs sendsignals
  19. # Should-Stop:
  20. # Default-Start: 2 3 4 5
  21. # Default-Stop: 0 1 6
  22. # Short-Description: Starts kernel and system log daemons.
  23. # Description: Starts kernel and system log daemons.
  24. # /etc/fstab.
  25. # X-LFS-Provided-By: LFS
  26. ### END INIT INFO
  27. . /lib/lsb/init-functions
  28. case "${1}" in
  29. start)
  30. log_info_msg "Starting system log daemon..."
  31. parms=${SYSKLOGD_PARMS-'-m 0'}
  32. start_daemon /sbin/syslogd $parms
  33. evaluate_retval
  34. log_info_msg "Starting kernel log daemon..."
  35. start_daemon /sbin/klogd
  36. evaluate_retval
  37. ;;
  38. stop)
  39. log_info_msg "Stopping kernel log daemon..."
  40. killproc /sbin/klogd
  41. evaluate_retval
  42. log_info_msg "Stopping system log daemon..."
  43. killproc /sbin/syslogd
  44. evaluate_retval
  45. ;;
  46. reload)
  47. log_info_msg "Reloading system log daemon config file..."
  48. pid=`pidofproc syslogd`
  49. kill -HUP "${pid}"
  50. evaluate_retval
  51. ;;
  52. restart)
  53. ${0} stop
  54. sleep 1
  55. ${0} start
  56. ;;
  57. status)
  58. statusproc /sbin/syslogd
  59. statusproc klogd
  60. ;;
  61. *)
  62. echo "Usage: ${0} {start|stop|reload|restart|status}"
  63. exit 1
  64. ;;
  65. esac
  66. exit 0
  67. # End sysklogd