Open GoogleCodeExporter opened 9 years ago
Original comment by Conal.Tuohy
on 4 Nov 2011 at 5:14
The simplest method for doing this (on RHEL) is to exec them via
/etc/rc.d/rc.local
Original comment by tosello....@gmail.com
on 4 Nov 2011 at 7:07
Original comment by Conal.Tuohy
on 21 Nov 2011 at 7:04
The following screen commands will start a detatched screen and push commands
to it to be executed.
{{{
screen -dmS <sessionname>
screen -x <sessionname> -X stuff $'<command>\n'
}}}
Thus, we need to add something like the following to init.d (or a script run
from init.d)
{{{
screen -dmS ingest
screen -x ingest -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/ingest-handler.xml'
screen -dmS metadata
screen -x metadata -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/metadata-update-handler.xml'
screen -dmS vamas
screen -x vamas -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/vamas-update-handler.xml'
}}}
Original comment by tosello....@gmail.com
on 25 Nov 2011 at 3:43
Made the following script and added it to /etc/rc.d/rc.local:
{{{
#!/bin/sh
screen -dmS ingest
screen -dmS metadata
screen -dmS vamas
sleep 2s;
screen -S ingest -p 0 -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/ingest-handler.xml\n'
screen -S metadata -p 0 -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/metadata-update-handler.xml\n
'
screen -S vamas -p 0 -X stuff $'/home/fedora-user/pipelines/start.sh
/home/fedora-user/pipelines/update-handler-configs/vamas-update-handler.xml\n'
}}}
Original comment by tosello....@gmail.com
on 25 Nov 2011 at 4:54
Original issue reported on code.google.com by
Conal.Tuohy
on 4 Nov 2011 at 5:14