service - How to properly check if a slow starting java tomcat application is running so you can restart it? -


i want implement automatic service restarting several tomcat applications, applications take lot of time start, on 10 minutes.

mainly test check if application responding on http valid response.

still, not problem, problem how prevent uptime check fail while service under maintenance, scheduled or not.

i don't want service started if stopped manually, `service appname stop".

i considered creating .maintenance files on stop or restart actions of daemon , checking them before triggering automated restart.

so far problem wasn't able solve was, how detect app finished starting , remove .maintenance file, automatic restart work properly.

note, init.d script not supposed wait, daemon should start background command solves problem.


Comments