[mythtv-users] mythbackend service not reliably closing via script

tim draper veehexx at gmail.com
Mon Apr 4 07:31:56 UTC 2011

that was my issues on the first revision of the script; script runs as
'root', and called scripts from ~\scripts\yyy.sh.
all paths are hardlinked now.

i've found a work around; stop mythtv-backend service from ever running, and
run 'mythbackend -d'.
this way i can kill mythbackend by doing 'sudo killall mythbackend' reliably
and so far it's been working fine. so far, it works as expected, although i
suspect if the mythbackend stops for any reason i will need to re-launch it

i'm still interested to know why 'sudo service mythtv-backend [status]'
freezes the script, as it works fine when ran manually, but I've found a
working solution. could this be a bug in the way mythtv-backend is handled?
other service commands work fine; it's specifically related to
mythtv-backend service and being called from a script (Bash or SHell - cant
remember which i've got set)
unless their just alias', then the various other ways of changing service
states i've tried are 'stop mythtv-backend' and something like
'/etc/init.d/mythtv-backend stop', i've even tried the -q switch too incase
it  had something todo with the text that is displayed.

i don't really know enough about linux to go much further, so i'm dubious as
to whether i should consider this a bug and submit a report, or leave it
alone and face the fact *I* cant get it working the way i want to.


On 2 April 2011 12:25, tim draper <veehexx at gmail.com> wrote:

> due to my hardware, i am unable to simply issue a standard 'pm-suspend'
> command to my mythtv pc - specifically my tv card drivers have issues with
> suspending so i have to unload the tv card drivers to ensure livetv works
> correctly on resume.
> my solution is to close mythtv-backend service, modprobe -r the tv card
> drivers, and then suspend. upon resume i then modprobe the drivers and
> restart mythbackend.
> the problem is that when mythbackend initials the halt command (sudo
> /usr/sbin/pm-suspend), then it will hang the script once the service stops
> and wont allow the pc to continue suspending. issuing pm-suspend runs fine
> when running via SSH.
> i'm attempting to stop the mythbackend service via 'sudo service
> mythtv-backend stop'. according to the log i'm writing the script output to,
> the service stops. however once the 'sudo service' command completes, the
> script appears to freeze and wont continue the remaining of the script.
> any ideas, or anyone found an alternative solution to closing
> mythtv-backend via script?
> thanks for any help - i'm really stuck on this one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110404/d72ceada/attachment.html 

More information about the mythtv-users mailing list