reportquery 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: reportquery
  4. # Required-Start: $local_fs $network
  5. # Required-Stop: $local_fs
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: 0 1 6
  8. # Short-Description: reportquery service
  9. # Description: console reportquery daemon
  10. ### END INIT INFO
  11. #
  12. # reportquery This shell script takes care of starting and stopping
  13. # the ipfcst-reportquery subsystem (reportquery).
  14. #
  15. # chkconfig: 345 64 36
  16. # description: ipfcst-reportquery.
  17. # processname: reportquery
  18. # Source function library.
  19. #. /etc/rc.d/init.d/functions
  20. # Source networking configuration.
  21. #. /etc/sysconfig/network
  22. # Support for extra options passed to reportquery
  23. command=$1 && shift
  24. extra_opts="$@"
  25. start(){
  26. sh /home/syjy/ipfcstV3/bin/start-reportquery.sh
  27. }
  28. stop(){
  29. sh /home/syjy/ipfcstV3/bin/stop-reportquery.sh
  30. }
  31. restart(){
  32. stop
  33. start
  34. }
  35. status(){
  36. sh /home/syjy/ipfcstV3/bin/status-reportquery.sh
  37. }
  38. # See how we were called.
  39. case "$command" in
  40. start)
  41. start
  42. ;;
  43. startup)
  44. start
  45. ;;
  46. stop)
  47. stop
  48. ;;
  49. shutdown)
  50. stop
  51. ;;
  52. status)
  53. status
  54. ;;
  55. state)
  56. status
  57. ;;
  58. restart)
  59. restart
  60. ;;
  61. restartup)
  62. restart
  63. ;;
  64. reload)
  65. exit 3
  66. ;;
  67. force-reload)
  68. restart
  69. ;;
  70. *)
  71. echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
  72. exit 2
  73. esac
  74. exit $?