SyntaxHighlighter JS

2013-01-19

WebLogic Start Script

This sample WebLogic start script has some functionality needed for a production environment

  • Run WebLogic as background service.  WebLogic will continue to run even after the user logs off the terminal.
  • Logs WebLogic system output and errors into a file.
  • Rotate to a new log file at every startup.
  • Display log output on-screen after startup.
#!/bin/sh

PWD=`dirname $0`
LOGFILE="/home/wluser/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/weblogicSys.out"

# Log rotation
if [ -f $LOGFILE ]; then
    APPENDIX=`date +%Y%m%d_%H%M%S`
    echo "Rotation log ${LOGFILE} to ${LOGFILE}_${APPENDIX}"
    mv ${LOGFILE} ${LOGFILE}_${APPENDIX}
fi

# Start up WebLogic as background service
touch $LOGFILE
nohup $PWD/startWebLogic.sh >> $LOGFILE 2>&1 &
tail -f $LOGFILE

No comments:

Post a Comment