lprng 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin lprng
  4. #
  5. # Description : Start lpd daemon
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.0
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: lprng
  14. # Required-Start: $local_fs
  15. # Should-Start: $remote_fs
  16. # Required-Stop: $local_fs
  17. # Should-Stop: $remote_fs
  18. # Default-Start: 3 4 5
  19. # Default-Stop: 0 1 2 6
  20. # Short-Description: Starts lpd daemon.
  21. # Description: Starts an implementation of the Berkeley LPR print
  22. # spooler functionality.
  23. # X-LFS-Provided-By: LFS
  24. ### END INIT INFO
  25. . /lib/lsb/init-functions
  26. #$LastChangedBy: bdubbs $
  27. #$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
  28. case "$1" in
  29. start)
  30. log_info_msg "Starting lpd..."
  31. start_daemon /usr/sbin/lpd
  32. evaluate_retval
  33. ;;
  34. stop)
  35. log_info_msg "Stopping lpd..."
  36. killproc /usr/sbin/lpd
  37. evaluate_retval
  38. ;;
  39. reload)
  40. boot_mesg "Reloading lpd..."
  41. killproc /usr/sbin/lpd -HUP
  42. evaluate_retval
  43. ;;
  44. restart)
  45. $0 stop
  46. sleep 1
  47. $0 start
  48. ;;
  49. status)
  50. statusproc /usr/sbin/lpd
  51. ;;
  52. *)
  53. echo "Usage: $0 {start|stop|reload|restart|status}"
  54. exit 1
  55. ;;
  56. esac
  57. # End /etc/init.d/lprng