http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/txml_launchscript.html

 

  =====Uninstall===========================================================================

was@tcrea01:/app/was/BuildServer/scripts> cat uninstall.sh
#!/bin/sh
# $1 EAR Name
WAS_HOME=/app/was/WebSphere/AppServer/
SCRIPT_HOME=/app/was/BuildServer/scripts
TMP_HOME=/app/was/BuildServer/tmp

#check whether the designated application is installed or not
$WAS_HOME/bin/wsadmin.sh -lang jython -c "print AdminApp.isAppReady('$1')" > $TMP_HOME/status_$1.log

COUNT=`cat $TMP_HOME/status_$1.log | grep $1 | wc -l`
echo "$1 is installed : $COUNT times"

#uninstall
if [ "$COUNT" -eq 1 ]; then 
        echo "The $1 is installed, start uninstalling..."
        $WAS_HOME/bin/wsadmin.sh -lang jacl -f $SCRIPT_HOME/uninstall_$1.jacl
else
        echo "The Applicaiton $1 is not installed, Skip Uninstalling..."
fi

 

was@tcrea01:/app/was/BuildServer/scripts> cat uninstall_DSAccEAR.jacl
$AdminApp uninstall DSAccEAR
$AdminConfig save

 

 

========Install==================================================================================
./wsadmin.sh -f /app/was/BuildServer/scripts/install_${APPLICATION_NAME}.jacl

 

was@tcrea01:/app/was/BuildServer/scripts> cat uninstall_DSAccEAR.jacl
$AdminApp uninstall DSAccEAR
$AdminConfig save
was@tcrea01:/app/was/BuildServer/scripts> cat install_DSAccEAR.jacl
#AdminApp install /appdata/wasapps/acc/DSAccEAR.ear {-MapModulesToServers {{"OraNEFSS_APPLIB" NE0201_ApplicationLibrary.jar,META-INF/ejb-jar.xml WebSphere:cell=tcrea01Cell01,node=tcrea01Node01,server=accsvr} {"NE0101_StartupEJB" NE0101_StartupEJB.jar,META-INF/ejb-jar.xml WebSphere:cell=tcrea01Cell01,node=tcrea01Node01,server=accsvr} {"DSGiantEJB" DSGiantEJB.jar,META-INF/ejb-jar.xml WebSphere:cell=tcrea01Cell01,node=tcrea01Node01,server=accsvr} {"DSOrdEJB" DSOrdEJB.jar,META-INF/ejb-jar.xml WebSphere:cell=tcrea01Cell01,node=tcrea01Node01,server=accsvr} "DSOrdWEB" DSOrdWEB.war,WEB-INF/web.xml WebSphere:cell=tcrea01Cell01,node=tcrea01Node01,server=cmrsvr}}}

 

 

========Start=====================================================================================

./wsadmin.sh -f /app/was/BuildServer/scripts/start_${APPLICATION_NAME}.jacl

 

was@tcrea01:/app/was/BuildServer/scripts> cat start_DSAccEAR.jacl
set appManager [$AdminControl queryNames cell=tcrea01Cell01,node=tcrea01Node01,type=ApplicationManager,process=accsvr,*]

$AdminControl invoke $appManager startApplication DSAccEAR

 

========= Running Check.. ===================================

 #!/bin/sh
# $1 EAR Name

WAS_HOME=/app/was/WebSphere/AppServer/
SCRIPT_HOME=/app/was/BuildServer/scripts
TMP_HOME=/app/was/BuildServer/tmp

#check whether the designated application is installed or not
$WAS_HOME/bin/wsadmin.sh -lang jython -c "print AdminControl.completeObjectName('type=Application,name=$1,*')" >
$TMP_HOME/status_$1.log

COUNT=`cat $TMP_HOME/status_$1.log | grep $1 | grep "WebSphere" | wc -l`
echo "$1 is installed : $COUNT times"

#Stop First if the application is running.
if [ "$COUNT" -eq 1 ]; then
      echo "The $1 is running, Force to stop and start .."

......

fi

 

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스
<< PREV : [1] : ... [52] : [53] : [54] : [55] : [56] : [57] : [58] : [59] : [60] : ... [160] : NEXT >>

BLOG main image

공지사항

카테고리

분류 전체보기 (160)
MAMP LAMP (1)
Open Project (4)
Knowhow (57)
JEE Technologies (3)
Rational Products (94)
Etc (0)