ansible-roles/library/roles/rstudio-server/files/tomcat_checkandstart

18 lines
286 B
Bash

#!/bin/bash
ISTOMCATRUNNING="$(ps -fu gcube | grep -v grep | grep -c java)"
if (( $ISTOMCATRUNNING == 0 ))
then
sleep 60
ISTOMCATRUNNING="$(ps -fu gcube | grep -v grep | grep -c java)"
fi
if (( $ISTOMCATRUNNING == 0 ))
then
/etc/init.d/tomcat-instance-9000 restart
fi
exit 0