[mythtv-users] Cannot run mythbackend with init.d script - runs fine at command prompt. - RESOLVED

drbob drbob at gmx.co.uk
Sat Sep 30 22:04:37 UTC 2006


Chad wrote:
> The option that looks like the 'culprit' to me is:
>
> RUNDIR=/var/run/mythtv
>

I may be reading the script wrong but I think the RUNDIR variable simply 
tells the script where to put the pid file.

> So you'll want to have your mysql.txt file in that directory (you can
> copy from ~/.mythtv/).  If it gets overwritten (which it looks like it
> does), it looks like the script will also look in /etc/mythtv for a
> file called mythtv-backend, where I assume you would place your
> mysql.txt file.  You could make it really ugly and do something like
> EXTRA_ARGS="cp /etc/mythtv/mysql.txt /var/run/mythtv/"
>
> Assuming nothing else works.
/etc/mythtv/mysql.txt has the correct details in it, as does 
/usr/share/mythtv/. However /home/mythtv/.mythtv did not exist.

For some reason it seems that when starting as a daemon mythbackend only 
looks in the home directory of the mythtv user for the mysql.txt 
configuration file. When started manually it looks in /etc/mythtv/

I created a /home/mythtv/.mythtv/mysql.txt file and this resolved the 
problem.

I believe the reason the /home/mythtv/.mythtv directory was missing is 
that I had previously installed mythtv 0.18 from source (but never used 
it) I deleted all the 0.18 files and removed the mythtv user I had 
created for 0.18 before installing from the 0.19 debian packages, 
however I forgot to remove the mythtv user home directory. This meant 
that after installation of the packages the mythtv home directory had no 
user and no group set so the mythtv user couldn't write to it. I don't 
know how this would have affected the install scripts (which run as 
root). I manually changed the ownership of the home directory when I 
noticed this.

I'm not sure if the debian package install scripts not dealing 
gracefully with the above situation could be construed as a bug.


More information about the mythtv-users mailing list