Guest User

Untitled

a guest
Oct 18th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: jboss
  4. # Required-Start: $local_fs $remote_fs $network $syslog
  5. # Required-Stop: $local_fs $remote_fs $network $syslog
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: 0 1 6
  8. # Short-Description: Start/Stop JBoss AS v7.0.0
  9. ### END INIT INFO
  10. #
  11. #source some script files in order to set and export environmental variables
  12. #as well as add the appropriate executables to $PATH
  13. [ -r /etc/profile.d/java.sh ] && . /etc/profile.d/java.sh
  14. [ -r /etc/profile.d/jboss.sh ] && . /etc/profile.d/jboss.sh
  15.  
  16. case "$1" in
  17. start)
  18. echo "Starting JBoss AS 7.0.0"
  19. sudo -u jboss sh ${JBOSS_HOME}/bin/standalone.sh
  20. ;;
  21. stop)
  22. echo "Stopping JBoss AS 7.0.0"
  23. sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-admin.sh --connect command=:shutdown
  24. ;;
  25. *)
  26. echo "Usage: /etc/init.d/jboss {start|stop}"
  27. exit 1
  28. ;;
  29. esac
  30.  
  31. exit 0
Add Comment
Please, Sign In to add comment