source ~/.bash_profile
#!/bin/sh
WEBLOGIC_RESULT=`/bin/ps -el | /bin/grep WebLogic`
if [ "$WEBLOGIC_RESULT"="" ] ; then
JAVA_RESULT=`/usr/bin/pgrep java`
if [ "$JAVA_RESULT"!="" ] ; then
/usr/bin/killall java
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/base_domain/startWebLogic.sh > /base_domain.log &
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/hzyl_domain/startWebLogic.sh > /hzyl_domain.log &
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/jkda_domain/startWebLogic.sh > /jkda_domain.log &
else
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/base_domain/startWebLogic.sh > /base_domain.log &
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/hzyl_domain/startWebLogic.sh > /hzyl_domain.log &
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/jkda_domain/startWebLogic.sh > /jkda_domain.log &
fi
else
LISTEN_80_RESULT=`/bin/netstat -anp | /bin/grep ::1:80'
LISTEN_7001_RESULT=`/bin/netstat -anp | /bin/grep ::1:7001`
LISTEN_7002_RESULT=`/bin/netstat -anp | /bin/grep ::1:7002`
if [ "$LISTEN_80_RESULT"="" ] ; then
LISTEN_80_RESULT_JAVA_PID=`/bin/ps -ef | /bin/grep AdminServer_hzyl | grep -v grep | awk `{print $2}`
if [ "$LISTEN_80_RESULT_JAVA_PID"!="" ] ; then
/usr/bin/kill -9 LISTEN_80_RESULT_JAVA_PID
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/hzyl_domain/startWebLogic.sh > hzyl_domain.log &
else
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/hzyl_domain/startWebLogic.sh > hzyl_domain.log &
fi
fi
if [ "$LISTEN_7001_RESULT"="" ] ; then
LISTEN_7001_RESULT_JAVA_PID=`/bin/ps -ef | /bin/grep AdminServer_base | grep -v grep | awk `{print $2}`
if [ "$LISTEN_7001_RESULT_JAVA_PID"!="" ] ; then
/usr/bin/kill -9 LISTEN_7001_RESULT_JAVA_PID
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/base_domain/startWebLogic.sh > base_domain.log &
else
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/base_domain/startWebLogic.sh > base_domain.log &
fi
fi
if [ "$LISTEN_7002_RESULT"="" ] ; then
LISTEN_7002_RESULT_JAVA_PID=`/bin/ps -ef | /bin/grep AdminServer_jkda | grep -v grep | awk `{print $2}`
if [ "$LISTEN_7002_RESULT_JAVA_PID"!="" ] ; then
/usr/bin/kill -9 LISTEN_7002_RESULT_JAVA_PID
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/jkda_domain/startWebLogic.sh > jkda_domain.log &
else
/usr/bin/nohup /WebLogic_12c/Middleware/user_projects/domains/jkda_domain/startWebLogic.sh > jkda_domain.log &
fi
fi
fi
重启WebLogic 脚本
最新推荐文章于 2020-09-15 15:12:05 发布