Thursday, November 5, 2015

EBS 12.2 -- Automatic Start / Stop Scripts

http://ermanarslan.blogspot.qa/2015/01/ebs-122-automatic-start-stop-scripts.html EBS 12.2 -- Automatic Start / Stop Scripts In this post; you will find start and stop scripts for EBS 12.2 . This scripts are capable for starting and stopping Weblogic services as well. Shutdown script kills the remaining application processes after it finish stopping apps services. Scripts must be run using application owner OS user (for ex : applmgr). Note that : This scripts are tested and verified in a Development envrionment. The risk is yours if you want to use them.. Also these scripts can be modified and make better .. I will make some enhancements in a couple of days.. Enhancements like adding some lines for unlocking the domain , adding some exceptions and adding some echso for having a better output.. START SCRIPT: ### ERMAN ARSLAN EBS 12.2 APPS START automated ### 12/30/2013 ## supply appspassword and weblogicpassword in sequence as command line arguments ### reviewed and tested 1/15/2015 if [ `whoami` == "root" ] then echo you can not run this script with root! exiting else . /u01/apps/EBSapps.env run { echo apps; echo $1; echo $2; } | sh $ADMIN_SCRIPTS_HOME/adstrtal.sh -nopromptmsg fi SHUTDOWN SCRIPT: ### ERMAN ARSLAN EBS 12.2 APPS SHUTDOWN automated ### 12/30/2013 ## supply appspassword and weblogicpassword in sequence as command line arguments ### reviewed and tested 1/15/2015 if [ `whoami` == "root" ] then echo you can not run this script with root! exiting else . /u01/apps/EBSapps.env run { echo apps; echo $1; echo $2; } | sh $ADMIN_SCRIPTS_HOME/adstpall.sh -nopromptmsg sleep 10 export APPLICATION_USER=`whoami` kill -9 `ps -ef|grep appldev|grep -v grep |grep -v bash|grep -v sshd |grep -v "ps -ef"| grep -v shutdownapps | awk '{print $2}'` fi Example Run: FOR START using application owner user -> sh startupapps.sh apps welcome123 FOR STOP using application owner user -> sh shutdownapps.sh apps welcome123 Note: Dont use the shutdown script on a single node environment which has a shared user as the owner of both database and application files. If you have such an environment (by the way; you shouldnt have such a confiuration ) and still if you want to use the shutdown script, comment the line with kill command in the shutdown script

No comments:

Post a Comment