now i'm using below script start & stop tomcat in server.
now want modify stop or start remote tomcat base on ip address.
please give me suggestions.
catalina_home=/home/tomcat; export catalina_home start() { echo -n "starting tomcat: " su $tomcat_owner -c $catalina_home/bin/startup.sh status=$(tail -50 $catalina_home/logs/catalina.out | grep "server startup") echo "$status" } stop() { echo -n "stopping tomcat: " su $tomcat_owner -c $catalina_home/bin/shutdown.sh ps -eaf | grep "$catalina_home/bin" | grep -v "grep" |awk -f " " '{print $2}' >> proc_id cat proc_id | while read line kill -9 $line >> tomcat_stop.log done rm -rf proc_id }
is there reason can't ssh onto server , restart tomcat?
that normal way of restarting tomcat remotely.
Comments
Post a Comment