Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added start/stop option for administration console - security reasons - Flavio Torres

...

Code Block
#!/bin/bash
### BEGIN INIT INFO
# Provides: start-pentaho stop-pentaho
# Required-Start: networking mysql
# Required-Stop: mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Pentaho BI Platform
3.5
### END INIT INFO
export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"
export JRE_HOME="/usr/lib/jvm/java-1.5.0-sun/jre"

start(){
if [ "$1" == "adm" ];then
        echo "StartingIniciando aplicacao administration-console"
        cd ../administration-console
       ./start-pac.sh > /tmp/pentaho_console.out 2>&1 &

else
        echo "StartingIniciando aplicacao biserver"
        ./start-pentaho.sh > /tmp/pentaho.out 2>&1
fi

echo "ok"

}

stop(){
echo "recebi: $1"

if [ "$1" == "adm" ];then
        echo "StoppingFinalizando aplicacao administration-console"
        cd ../administration-console
        ./stop-pac.sh
else
        echo "StoppingFinalizando aplicacao biserver"
        ./stop-pentaho.sh
fi

echo "ok"
}


case "$1" in
start)
        start $2
        ;;
stop)
        stop $2
        ;;
*)
        printf "\nUsage: $0 \n
                start | stop            : Inicia ou Startfinaliza ora Stopaplicacao biserver\n
                start adm | stop adm    : StartInicia ou orfinaliza Stopo administration console\n\n"
        ;;
esac
exit 0

...