Normally i restart tomcat by entering the command on the putty.My problem tomcat always hang.Below is the step 1. ps aux | grep tomcat 2. Get PID 3. Kill PID cd /usr/local/tomcat/bin 4../startup.sh
and now plan to make it auto but then how to add in the script below.
$ssh = new Net_SSH2('172.16.2.96');
if (!$ssh->login('root', 'password')) {
exit('Login Failed');
}
//Line here
echo $ssh->exec('service tomcat start');
really appreciate your help.thank you