Create Weblogic Start Script with nohup and log

sudo su – oracle
vi .bashrc
Add
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
vi .bash_aliases
Add a line for each domain
alias set_<instancename>='. ~/bin/set_domain.sh <instancename>'
alias start_<instancename>='. ~/bin/start_domain.sh <instancename>'
alias stop_<instancename>='. ~/bin/stop_domain.sh <instancename>'
mkdir bin
mkdir logs
chmod 775 logs
cd bin
vi set_mw_home.sh
export MW_HOME=/app/oracle/product/ofm11g
vi set_domain.sh
. ~/bin/set_mw_home.sh
export DOMAIN_HOME=/app/oracle/product/ofm11g/user_projects/domains/$1
vi stop_domain.sh
. ~/bin/set_domain.sh $1
nohup $DOMAIN_HOME/bin/stopWebLogic.sh > ~/logs/stop_$1_domain.`date +%y%m%d%H%M%S`.log 2>&1 &
vi start_domain.sh
. ~/bin/set_domain.sh $1
nohup $DOMAIN_HOME/startWebLogic.sh > ~/logs/start_$1_domain.`date +%y%m%d%H%M%S`.log 2>&1 &
chmod 775 *

# To Watch your logs simply
tail -f ../logs/stop*
tail -f ../logs/start*

# Start Instance
sudo su – oracle
start_<instancename>

# Stop Instance
sudo su – oracle
stop_instancename