Hi,
Hi.
can I shutdown freevo through one lirc event/command without selecting the shutdown menu point ?
Yes!
and if how ??
Well, I am not sure if you can bind a Freevo event to shutdown but the way I do it is with irexec. Irexec is a command that comes with lirc that you can have it run a command per button press based on configuration. In my /etc/init.d/freevo system start/stop script I have:
case "$1" in
start)
if [ "`ps -ef | grep irexec | grep -v grep`" = '' ]
then
/usr/local/bin/irexec -d /etc/freevo/irexec.conf
fiOk, so that't not the cleanest but upon startup it looks for a running irexec process and runs it if none is found. In /etc/freevo/irexec.conf I have:
begin
remote = hauppauge_pvr
button = Power
prog = irexec
repeat = 0
config = /etc/freevo/onoff_switch
endSo, every time that I press the power button the onoff_switch gets executed. That is a very messy shell script that decides if Freevo is running or not then starts or stops it. The contents of that file are:
#!/bin/bash
TEST=`ps -ef | grep freevo | grep -v grep | grep -v irexec | grep -v onoff | grep -v "less " | grep -v "vi " | grep -v "cron" | grep -v "tail " | grep -v recordserver | grep -v bitch | grep -v webserver | grep -v tv_grab`
if [ "$TEST" = "" ] then echo Freevo is off, starting. /etc/init.d/freevo start else echo Freevo is on, stopping. /opt/freevo/freevo stop fi
Ok, the TEST line is horrible I know. ;) I made that before adding pid file support to Freevo and need to fix it. Actually, perhaps I will add a 'switch' option to my /etc/init.d/freevo and commit it to CVS.
Would others find this useful? I can use the power button on my remote to startup and shutdown Freevo with no issues.
-Rob
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
