Posted By

nialace on 02/18/11


Tagged

linux


Versions (?)

configure service in linux


 / Published in: Bash
 

pour connaitre le niveau de démarrage : runlevel #root

ou : who -r

  1. lancer la commande :
  2. chkconfig --add jira
  3. chkconfig --level 5 jira on
  4.  
  5. avoir l'executable jira dans /etc/init.d
  6.  
  7. #!/bin/bash
  8. #
  9. # chkconfig: 2345 85 15
  10. # description: jira
  11. # processname: jira
  12. # source function library
  13. . /etc/init.d/functions
  14.  
  15. JAVA_HOME="/usr/java/default"
  16. JRE_HOME="/usr/java/default"
  17. CATALINA_HOME="/usr/lib/jira/jira"
  18.  
  19. RETVAL=0
  20.  
  21. start() {
  22. echo -n $"Starting jira services: "
  23. . /usr/lib/jira/jira/bin/catalina.sh start
  24. RETVAL=$?
  25. echo
  26. }
  27.  
  28. stop() {
  29. echo -n $"Shutting down jira services: "
  30. . /usr/lib/jira/jira/bin/catalina.sh stop
  31. RETVAL=$?
  32. echo
  33. }
  34.  
  35. case "$1" in
  36. start)
  37. start
  38. ;;
  39. stop)
  40. stop
  41. ;;
  42. restart|reload)
  43. stop
  44. start
  45. ;;
  46. status)
  47. status jira
  48. RETVAL=$?
  49. ;;
  50. *)
  51. echo $"Usage: $0 {start|stop|restart|status}"
  52. exit 1
  53. esac
  54. exit $RETVAL

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: nialace on February 22, 2011

essayer

chkconfig --levels 235 nfs on

You need to login to post a comment.