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 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 stackoverflow.com Oct 17 '11 at 13:42

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

add comment

1 Answer

its actually piss-poor-simple:

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

Your Answer

 
discard

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