atd 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin atd
  4. #
  5. # Description : Start atd daemon
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.2
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: atd
  14. # Required-Start: $time
  15. # Should-Start:
  16. # Required-Stop:
  17. # Should-Stop:
  18. # Default-Start: 2 3 4 5
  19. # Default-Stop: 0 1 6
  20. # Short-Description: atd daemon
  21. # Description: Run jobs queued for later execution
  22. # X-LFS-Provided-By: BLFS / LFS 7.2
  23. ### END INIT INFO
  24. . /etc/rc.d/functions
  25. #$LastChangedBy: bdubbs $
  26. #$Date: 2012-05-09 15:19:23 -0500 (Wed, 09 May 2012) $
  27. case "$1" in
  28. start)
  29. log_info_msg "Starting atd..."
  30. start_daemon /usr/sbin/atd
  31. evaluate_retval
  32. ;;
  33. stop)
  34. log_info_msg "Stopping atd..."
  35. killproc /usr/sbin/atd
  36. evaluate_retval
  37. ;;
  38. restart)
  39. $0 stop
  40. sleep 1
  41. $0 start
  42. ;;
  43. status)
  44. statusproc /usr/sbin/atd
  45. ;;
  46. *)
  47. echo "Usage: $0 {start|stop|restart|status}"
  48. exit 1
  49. ;;
  50. esac
  51. # End atd