Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to deploy a .war on a Jenkins slave node that is running Jetty using an execute shell build step. To do this I am running the following in my shell command.

/etc/init.d/jetty restart

It starts Jetty successfully, but as soon as the Jenkins job finishes it stops. As I was trouble shooting this, I put a long sleep in the shell build step, and Jetty ran the entire time during the sleep, so I know it has something to do with exiting the shell after the job completes.

Is there any way to keep Jetty running after the shell exits in Jenkins?

I have tried using this but it doesn't do the trick.

nohup /etc/init.d/jetty restart &

share|improve this question

migrated from Oct 17 '11 at 13:42

This question came from our site for professional and enthusiast programmers.

its actually piss-poor-simple:

echo "/etc/init.d/jetty restart"| at now
share|improve this answer

Your Answer


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