console 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: console
  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: console service
  9. # Description: console service daemon
  10. ### END INIT INFO
  11. #
  12. # console This shell script takes care of starting and stopping
  13. # the ipfcst-console subsystem (console).
  14. #
  15. # chkconfig: 345 64 36
  16. # description: ipfcst-console.
  17. # processname: console
  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 console
  23. command=$1 && shift
  24. extra_opts="$@"
  25. v3home=/home/syjy/ipfcstV3
  26. start() {
  27. sh ${v3home}/bin/start-console.sh
  28. }
  29. stop() {
  30. sh ${v3home}/bin/stop-console.sh
  31. }
  32. restart() {
  33. stop
  34. start
  35. }
  36. status() {
  37. sh ${v3home}/bin/status-console.sh
  38. }
  39. # See how we were called.
  40. case "$command" in
  41. start)
  42. start
  43. ;;
  44. startup)
  45. start
  46. ;;
  47. stop)
  48. stop
  49. ;;
  50. shutdown)
  51. stop
  52. ;;
  53. status)
  54. status
  55. ;;
  56. state)
  57. status
  58. ;;
  59. restart)
  60. restart
  61. ;;
  62. restartup)
  63. restart
  64. ;;
  65. reload)
  66. exit 3
  67. ;;
  68. force-reload)
  69. restart
  70. ;;
  71. *)
  72. echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
  73. exit 2
  74. ;;
  75. esac
  76. exit $?