JEUS6 시작 스크립트 (jeus_start.sh)

  • netrojoke
    (netrojoke)
  • netrojoke's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
24 Jun 2017 01:04 #2261 작성자: netrojoke
netrojoke 님의 글: JEUS6 시작 스크립트 (jeus_start.sh)
#! /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'`
좋아요를 누른 살쾡이: jeikina
Time to create page: 0.060 seconds
Powered by Kunena Forum