Il y a beaucoup de scripts init, qui circulent de par le monde, et celui ci c'est le mien (TM), utilisé ici, pour démarrer Jira, il sera utilise pour démarrer jboss,tomcat, etc … qui démarrent avec un script shell, mais qui n'ont pas de script initd.
Pourquoi le Marcello-script plutot qu'un autre ?
#! /bin/sh # # Author: Emmanuel Kasper <emmanuel.kasper@JOB> # # Sytem options like $JAVA_HOME should be sourced from /etc/profile # App specifics options should be sourced in script or /etc/defaut/my_app # ### BEGIN INIT INFO # Provides: tomcat # Required-Start: $local_fs $network $syslog # Required-Stop: $local_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Start Tomcat ### END INIT INFO # Specific to This tomcat installation #export JAVA_OPTS="-Dsolr.solr.home=/opt/solr.home" PATH=/bin:/usr/bin:/sbin:/usr/sbin DAEMON=/opt/tomcat/bin/catalina.sh DAEMON_USER=tomcat DESCRIPTION="Tomcat6" RUN_STRING="/opt/tomcat/conf/logging.properties" test -x $DAEMON || exit 0 case "$1" in start) echo "Starting $DESCRIPTION" su --preserve-environment \ --shell /bin/sh \ --login $DAEMON_USER \ --command "$DAEMON start" ;; stop) echo "Stopping $DESCRIPTION" su --preserve-environment \ --shell /bin/sh \ --login $DAEMON_USER \ --command "$DAEMON stop" ;; force-reload|restart) $0 stop $0 start ;; status) pgrep -lf $RUN_STRING ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" exit 1 ;; esac exit 0