#!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO # copy to /etc/init.d/ # run update-rc.d tomcat7 defaults to enable PATH=/sbin:/bin:/usr/sbin:/usr/bin # directory of where biserver lives BISERVER_HOME=/usr/local/xtuple/ErpBI/biserver-ce start() { cd $BISERVER_HOME ./start-pentaho.sh } stop() { cd $BISERVER_HOME ./stop-pentaho.sh } case $1 in start|stop) $1;; restart) stop; start;; *) echo "Run as $0 "; exit 1;; esac