I have a small problem with my Fedora 17 OnDemand elastic agent.
I have followed all the instructions on the confluence website and have successfully set up a Fedora 17 elastic bamboo image.
However, I have one minor issue that I cannot get my head around. Hopefully someone with far greater Linux insight can shed some light.
The following line in rc.local does nothing on my Fedora 17 box:
su -c bamboo-elastic-agent - bamboo &
There is some issue with the & doing something wierd. If I remove it and move the ampersand to the /opt/bamboo-elastic-agent/bin/bamboo-elastic-agent script:
java -server -Xms32m -Xmx512m -XX:MaxPermSize=256m -cp $BAMBOO_CLASSPATH com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap 2>&1 | tee -a ~/bamboo-elastic-agent.out &
(Notice it has been added on the end!)
Everything is fine then...
I have tried lots and lots of debugging (4 hours worth) trying to work out why that line doesn't execute correctly in rc.local.
The following line works:
su -c "echo hello > ~/test.log" - bamboo &
it correctly creates the test.log file in the /home/bamboo location. However, if I move the same thing into a script:
/usr/bin/bamboo-test-script:
#!/bin/sh
echo hello
The following line will do nothing:
su -c "bamboo-test-script > ~/test.log" - bamboo &
But the following will work fine:
su -c "bamboo-test-script > ~/test.log" - bamboo
Do you guys have any idea what is going on? This is literally the only thing stopping me from making various distro elastic images 