AW: [vdr] execute command after vdr starts
udo_richter at gmx.de
Fri Sep 8 02:50:09 CEST 2006
> Yes, I like the idea of backgrounding VDR using "&" and then using 'wait $PID'.
> Is that the method you use? I've been trying to find the best way to do this.
> Could you give me an example? :)
Something like that. This is a snippet of my overgrown runvdr script:
# Run VDR
eval "$VDRCMD &"
# Remember PID of VDR process
# Wait for VDR to end or signal to arrive
# Remember return value of VDR
The reason I do it this way is that I also handle some signals sent to
runvdr, to terminate or restart on demand.
If you want to start something in parallel, its probably no big
difference whether you start your script before or after VDR, as long as
you background it. You can background within a script like this:
echo -n world
echo -n "hello "
> For now, I'm just trying to send a MESG via svdrpsend.pl to VDR so it displays a
> welcome message after starting up and initializing its plugins.
You can wait for the SVDRP socket to accept connections, that would be
one way to wait for a mainly running VDR.
More information about the vdr