This command works:
parallel-ssh -i -O 'IdentityFile=control.pem' -l control -H example.com 'nohup /home/hubot/runHubot.sh' 2>&1
When I log onto my server, ps
shows me that the runHubot script is running. However, this command is not backgrounded so it doesn't return to parallel-ssh
The same command, just with a single &
appended to nohup
doesn't work. Why?
parallel-ssh -i -O 'IdentityFile=control.pem' -l control -H example.com 'nohup /home/hubot/runHubot.sh &' 2>&1
This command returns to parallel-ssh, but the hubot script isn't in my ps
output.
How can I background this process using parallel-ssh (switching to another program is not an option)?
Best Answer
Do you see it in
ps -elf
orps aux
?ps
may only be showing you processes with a terminal.