工作中: 重起 weblogic 的shell

来源:互联网 发布:域名注册需要什么资料 编辑:程序博客网 时间:2024/06/10 03:14

#! /bin/ksh

 

# Notice:1: please excute this shell in: 12.34.56.78 (PRD-APP)server.
#        2: Please make sure the executed user is vsopadmin.

 

# Function: To start the APP  weblogic admin service.
# Author: Sheng Huiping
# Date: Dec 17 2010

 

# Step1: kill all exited thread:

ps -ef | grep admin | grep -v grep | awk '{print "kill -9",$2}' | sh

 

# Step2: Start the admin service:

su - vsopadmin -c '/weblogic/VSOPDOMAIN/nohupstart.sh & >> admin.log '

 

# Step3: Show the status:

 

if [ $? == 0 ]; then
        echo "AdminServer has started."
else
        echo "Started unsuccessfully."
fi

原创粉丝点击