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

Tim Draper veehexx at gmail.com
Wed Apr 6 11:02:16 UTC 2011

thanks for the advice. i'm pretty sure i already tried this with no luck
(sudo the script, and not sudo inside the script), but worth giving it
another go just to be sure.

On 4 April 2011 19:41, Robert Johnston <anaerin at gmail.com> wrote:

> On 04/04/2011 1:31 AM, tim draper wrote:
> > 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 manually.
> >
> > 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.
> You shouldn't use sudo in a batch script. If you don't have an auth
> token, sudo will stop execution and prompt to try and get one, which in
> a non-interactive shell script is very bad indeed. Remove the sudo, and
> run the script as root (with sudo) instead. This may be the cause of
> your problem: Sudo is waiting for a user to type in their password,
> which (if the script is running through cron, say, or STDOUT is
> redirected) won't happen, so the script appears to freeze.
> Just a thought.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110406/7b4d17df/attachment.html 

More information about the mythtv-users mailing list