Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a web application running as a jar, I need a automated way to restart this jvm with a reboot/crash.

What are you guys using for this? I am running ubuntu 10.04 lts . (Examples would be great)

Thanks

share|improve this question
    
During a server reboot/crash or when the jvm crashes? –  mahnsc Jun 11 '11 at 15:08
    
both would be ideal. –  Joey BagODonuts Jul 29 '11 at 2:56

1 Answer 1

Poor man's solution:

Make your Server create a proper pid file.

Create a bash script, that checks if a process with the pid number exists and if it doesn't starts it.

Then make a cron job that runs this bash script every minute.

(If it's running under Windows, substitute bash with batch script and cron job with an at job)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.