Confluence linux start stop script

Have you ever needed a confluence startup script to take care that your confluence get's autostarted?

Confluence startup script:

#!/bin/bash
# Confluence startup script
# Script provided by comdivision consulting GmbH (http://www.comdivision.com)
#chkconfig: 2345 80 05
#description: Confluence

CATALINA_HOME=/opt/confluence-3.0.0_01-std

start() {
        echo "Starting Confluence: "
          $CATALINA_HOME/bin/startup.sh
        echo "done."
}
stop() {
        echo "Shutting down Confluence: "
          $CATALINA_HOME/bin/shutdown.sh
        echo "done."
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 10
        #echo "Hard killing any remaining threads.."
        #kill -9 `cat $CATALINA_HOME/work/catalina.pid`
        start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
esac

exit 0

Install the script:

cd /etc/init.d
chmod a+rx confluence
chkconfig --add confluence
chkconfig --levels 345 confluence on
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.