bin bash PID cat var run catalina pid kill PID if then echo Tomcat wit

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/bash
PID=`cat /var/run/catalina.pid`
kill $PID
if [ $? == 0 ]
then
echo "Tomcat with procces $PID killed"
else
kill -9 $PID
fi
/usr/tomcat/bin/startup.sh
if [ $? == 0 ]
then
echo "Tomcat started"
fi