xinetd 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin xinetd
  4. #
  5. # Description : Start xinetd super server daemon
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.2
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: xinetd
  14. # Required-Start: $network
  15. # Should-Start:
  16. # Required-Stop: $network
  17. # Should-Stop:
  18. # Default-Start: 3 4 5
  19. # Default-Stop: 0 1 2 6
  20. # Short-Description: Starts the xinetd daemon.
  21. # Description: Starts the xinetd super server daemon to llisten to
  22. # specified incoming tcp and udp ports and execute
  23. # the configured service.
  24. # X-LFS-Provided-By: BLFS / LFS 7.2
  25. ### END INIT INFO
  26. . /etc/rc.d/functions
  27. #$LastChangedBy: dj $
  28. #$Date: 2011-12-05 01:38:40 -0600 (Mon, 05 Dec 2011) $
  29. case "$1" in
  30. start)
  31. log_info_msg "Starting xinetd..."
  32. start_daemon /usr/bin/xinetd
  33. evaluate_retval
  34. ;;
  35. stop)
  36. log_info_msg "Stopping xinetd..."
  37. killproc /usr/bin/xinetd
  38. evaluate_retval
  39. ;;
  40. reload)
  41. log_info_msg "Reloading xinetd..."
  42. killproc /usr/bin/xinetd -HUP
  43. ;;
  44. restart)
  45. $0 stop
  46. sleep 1
  47. $0 start
  48. ;;
  49. status)
  50. statusproc /usr/bin/xinetd
  51. ;;
  52. *)
  53. echo "Usage: $0 {start|stop|reload|restart|status}"
  54. exit 1
  55. ;;
  56. esac
  57. # End /etc/init.d/xinetd