#!/bin/sh
# Startup script for Pentaho 3.6 BI Server and Administrative Console
# Usage: ./pentaho-init.sh start | stop | restart
# Based on original startup script provided by Roland Bouman & Jos van Dongen in Pentaho Solutions
# set up command for pentaho user, set java environment
cmd="sudo -u pentaho JAVA_HOME=/usr/lib/jvm/java-6-sun"
JAVA_OPTS="-Djava.awt.headless=true"
case "$1" in
start)
# go to the pentaho biserver directory, or biserver will not be able to find config files
cd /opt/pentaho/biserver-ce
# run startup script for pentaho biserver
$cmd ./start-pentaho.sh >> pentaho-biserver.log &
# go to pentaho admin console directory, or PAC will not be able to find config files
cd /opt/pentaho/administration-console
# run startup script for pentaho admin console
cd /opt/pentaho/administration-console
$cmd ./start-pac.sh >> pentaho-admin-console.log &
;;
stop)
# go to pentaho admin console directory, or PAC will not be able to find config files
cd /opt/pentaho/administration-console
# run shutdown script for pentaho admin console
$cmd ./stop-pac.sh >> pentaho-admin-console.log &
# go to the pentaho biserver directory, or biserver will not be able to find config files
cd /opt/pentaho/biserver-ce
# run shutdown script for pentaho biserver
$cmd ./stop-pentaho.sh >> pentaho-biserver.log &
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
No comments:
Post a Comment