Jenkins swarm-plugin jar file, won't run in background
Posted
by
JeanMertz
on Server Fault
See other posts from Server Fault
or by JeanMertz
Published on 2012-09-11T15:16:33Z
Indexed on
2012/09/11
15:39 UTC
Read the original article
Hit count: 486
We're working on an automation script for our Jenkins slaves on a local Unix server. To connect the slaves to the Jenkins master, we use the swarm plugin. Setting up the master was easy, and connecting clients is also easy with a single command.
However, I am trying to get the slave command (a java application) to run in the background without stalling the current process, this doesn't seem to work.
I've created an init.d file and added it to update-rc.d
but that doesn't work.
#!/bin/bash
/usr/bin/java -jar /root/swarm-client-1.7-jar-with-dependencies.jar -executors 4
I've also tried to run it with an ampersand &
to start the process in the background, but that doesn't work either because - from looking at the source - the jar file actually boots another process that is then started in the foreground.
Any ideas on how to make this jar file start without stopping the bootstrap script?
© Server Fault or respective owner