View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Restart LIRC (Solved)
PostPosted: Tue Oct 03, 2006 12:01 am 
Offline
Joined: Thu Apr 27, 2006 1:07 am
Posts: 54
I am playing with my lircrc file. Rebooting i getting old to try out a small change. Is there any other way to get LIRC to re-load?

Using homebrew serial device.

I tried the /etc/init.d/lirc reload but it does not seem to work....

I can run /usr/sbin/lircd --nodameon and then irw works but no commands are getting passed to mythfrontend.....

Any ideas....?

UPDATE 2006/12/26 - See post below for the answer!


Last edited by sgunther on Tue Dec 26, 2006 4:10 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 03, 2006 2:05 am 
Offline
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location: UK
I've never been able to get mythfrontend to respond to changes in the lircrc file without rebooting :/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 03, 2006 8:37 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
It's an ugly answer but I have to concur. The lirc stack is complex and convoluted enough that I've never really gotten everything completely sorted out short of a reboot.


Top
 Profile  
 
 Post subject: Problem Solved
PostPosted: Tue Dec 26, 2006 4:09 pm 
Offline
Joined: Thu Apr 27, 2006 1:07 am
Posts: 54
OK so I finally had some time to do some digging and figured out how to restart lirc witout rebooting.

lircd and lircmd are the two daemons that must be restarted. I had always assumed that using the standard command for lirc would work...

Code:
/etc/init.d/lirc restart


In theory this likely would work for anyone not using the serial homebrew but part of the restart (and start for that matter) trys to reset the port and for the serial device it does not work.

There are two choices as I saw it to fix the issue...
Option A: Patch /etc/init.d/lirc to fix the port reset issue.
Option B: Write a custom lirc restart routine.

There are three steps that must occur to restart lirc...
Step 1: Stop the lircd and lircmd daemons.
Step 2: Start the lircd and lircmd daemons.
Step 3: Restart any applications that the lirc update would affect.

Given that...
1. I will likely run this from a command prompt in an ssh session.
2. Choosing Option A would still require the application restarts

I chose Option B. Here are the steps.....

ssh into the myth box and su to root
Code:
touch /usr/bin/restartlirc.sh
chown root:mythtv /usr/bin/restartlirc.sh
chmod 770 /usr/bin/restartlirc.sh
nano /usr/bin/restartlirc.sh


Now paste the following into nano...

Code:
#!/bin/sh
echo "Stopping lircd"
start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
echo "Stopping lircmd"
start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd
echo "Starting lircmd"
start-stop-daemon --start --quiet --signal 1 --exec /usr/sbin/lircd
echo "Starting lircmd"
start-stop-daemon --start --quiet --signal 1 --exec /usr/sbin/lircmd
echo "Restarting mythfrontend "
killall -9 mythfrontend
/etc/init.d/gdm restart
exit


Exit and save....

Now when you can run restartlirc.sh. I chose to actuall restart X vs just restart mythfrontend because when I am running from an ssh session the display would not be local. Hope this helps.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 5:16 pm 
Offline
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location: UK
Nice one, can't wait to try this out!

In the latest release gdm is no longer there so you'll probably just need to start mythfrontend.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 5:22 pm 
Offline
Joined: Thu Apr 27, 2006 1:07 am
Posts: 54
Can you start mythfrontend from the command prompt for another display device? When I ssh into the mythtv box from my PC I am not on Display 0.0 and running mythfrontend will not work.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu