template 882 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin scriptname
  4. #
  5. # Description :
  6. #
  7. # Authors :
  8. #
  9. # Version : LFS x.x
  10. #
  11. # Notes :
  12. #
  13. ########################################################################
  14. ### BEGIN INIT INFO
  15. # Provides: template
  16. # Required-Start:
  17. # Should-Start:
  18. # Required-Stop:
  19. # Should-Stop:
  20. # Default-Start:
  21. # Default-Stop:
  22. # Short-Description:
  23. # Description:
  24. # X-LFS-Provided-By:
  25. ### END INIT INFO
  26. . /lib/lsb/init-functions
  27. case "${1}" in
  28. start)
  29. log_info_msg "Starting..."
  30. start_daemon fully_qualified_path
  31. ;;
  32. stop)
  33. log_info_msg "Stopping..."
  34. killproc fully_qualified_path
  35. ;;
  36. restart)
  37. ${0} stop
  38. sleep 1
  39. ${0} start
  40. ;;
  41. *)
  42. echo "Usage: ${0} {start|stop|restart}"
  43. exit 1
  44. ;;
  45. esac
  46. exit 0
  47. # End scriptname