Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Small client for SVDRP
On Sun, Mar 16, 2003 at 02:37:05PM +0100, Oliver Friedrich wrote:
> Hi,
>
> At the moment i execute via the acpid a poweroff comand if a user presses
> the power button in the computer case. But this would interrupt vdr, even if
> it is recording at the moment. Instead i want to send vdr a "hitk power", so
> that vdr initiate the shutdown (or not).
>
> But i haven't perl on the small bootdisk/image, so i can't use the perl
> script that comes with vdr. Is there a small standalone solution available
> (a small c program), that can send some commands to vdr? Perhaps defined by
> a small config file ...
>
If you have devfs enabled, you can say:
echo "hitk power" > /dev/tcp/localhost/2001
The only problem is that VDR takes a while to wake up after the connection
has been established before it accepts SVDRP commands. Thus the above line
will not work. You would have to sleep for a couple of seconds before
sending the command. I haven't figured out haw to do this yet.
Another solution might be to use NetCat (the binary is called nc). I don't
know how big the nc binary is (can't check right now). But again the same
sleeping problem is present.
I'm sure there is a really simple solution for the waiting problem, it
just hasn't occurred to me so far...
> All help welcome...
> Oliver
--
Lauri
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index