JEUS6 시작 스크립트 (jeus_start.sh)
조회 2,996 · 댓글 0
#! /usr/bin/ksh
. /tmax/.profile
_process_list()
{
ja << EOF
pidlist
conlist
exit
EOF
}
_container_restart()
{
echo
echo "### JEUS Container${num} Down!! ###"
/tmax/jeus6/bin/downcon ${num}
sleep 2
echo
echo "### JEUS Container${num} Start!! ###"
/tmax/jeus6/bin/startcon ${num}
sleep 2
ps -fxu tmax | grep java | grep -v grep | grep container${num}
}
_process_check()
{
echo
cnt=`ps -fxu tmax | grep java | grep -v grep | wc -l`
echo "### $cnt java Process RUNNING!! ###"
}
_main()
{
echo
_process_list
echo
DATE=`date`
echo "========================================================="
echo " ** Restarting JEUS Container ** "
echo " @ Restarting Time : $DATE "
echo "========================================================="
num=1
_container_restart
num=2
_container_restart
#num=3
#_container_restart
_process_check
}
_main | tee -a /tmax/jeus6/logs/`hostname`/res_log/`hostname`_rescon_r.log_`date +'%y%m%d'`로그인 후 답글을 남길 수 있습니다.