
thomas at mashos
Aug 3, 2012, 2:30 PM
Post #7 of 10
(498 views)
Permalink
|
|
Re: Foolproof Mythbuntu start/restart irexec command
[In reply to]
|
|
On Fri, Aug 3, 2012 at 2:26 PM, Ian Evans <dheianevans [at] gmail> wrote: > On Fri, Aug 3, 2012 at 4:36 PM, Bill Meek <keemllib [at] gmail> wrote: >> On 08/03/2012 02:52 PM, Ian Evans wrote: >> ... >> >>> So again, the logic for the script is "If it's it running, killall >>> >>> mythfrontend.real (so Mythbuntu then restarts it) and if it's not >>> running at all start it." but I don't know how to write bash. >> >> >> Hi; >> >> Run this with the FE running and not running. If the output >> matches what you expect, replace the echos with your restart >> and start-up commands. >> >> #!/bin/sh >> >> pgrep mythfrontend.real 2>&1 > /dev/null >> >> if [ $? -eq 0 ]; then >> echo "Already running, put restart command here." >> else >> echo "Not running, put your start-up command here" >> fi > > Okay so this is the script I made and chmod +x'd > > ******************************************************* > #!/bin/sh > > pgrep mythfrontend.real 2>&1 > /dev/null > > if [ $? -eq 0 ]; then > echo "killall mythfrontend.real" > else > echo "mythfrontend --service" > fi > ******************************************************* > > in my myth lirc file I changed the button command from this: > > config = killall mythfrontend.real > > to this: > > config = /usr/share/mythtv/mythstartrestart.sh > > Restarted the system and it doesn't work. Did I do something wrong in > the bash script? > _______________________________________________ > mythtv-users mailing list > mythtv-users [at] mythtv > http://www.mythtv.org/mailman/listinfo/mythtv-users Have you tried enabling the "Generate frontend restart mapping" checkbox in the Mythbuntu Control Centre? It makes restarting the frontend mapped to pressing Power followed by Clear. Thanks, Thomas Mashos _______________________________________________ mythtv-users mailing list mythtv-users [at] mythtv http://www.mythtv.org/mailman/listinfo/mythtv-users
|