Init script for Tomcat to start different instances of Talend Admin Center

#!/bin/sh
#tomcat startup script
#description: tomcat

TOMCAT_HOME=/opt/Talend/AdminCenter/$2
export TOMCAT_HOME

JAVA_HOME=$(which java)
export JAVA_HOME

TOMCAT_OWNER=tomcat
export TOMCAT_OWNER

start() {
echo -n “Starting Tomcat:  ”
su $TOMCAT_OWNER -c $TOMCAT_HOME/bin/startup.sh
sleep 2
}
stop() {
echo -n “Stopping Tomcat: ”
su $TOMCAT_OWNER -c $TOMCAT_HOME/bin/shutdown.sh
}

# See how we were called.
case “$1” in
start)
start $2
;;
stop)
stop $2
;;
restart)
stop $2
start $2
;;
*)
echo “Usage: tomcat {start INSTANCE_NAME|stop INSTANCE_NAME|restart INSTANCE_NAME}”
exit
esac

Now you can start with  /etc/init.d/tomcat TAC_530 start or /etc/init.d/tomcat TAC_540 start