[mythtv] Re: CONTRIB: startup script for mythbackend (Mandrake 9.1 + others?)

Stu Tomlinson stu at nosnilmot.com
Thu Apr 17 10:06:36 EDT 2003


Mike,

Yes, very useful! thanks for revealing the secret of -d :)

Some buglets and suggestions (I'm using RedHat 9):

problem: gprintf isn't on RedHat 9
solution: echo works fine for me, with echo -n where appropriate
(Starting... and Stopping...)

How about putting the variables in /etc/sysconfig/mythbackend, and then
sourcing them with
. /etc/sysconfig/mythbackend
This would allow RPMs to flag /etc/sysconfig/mythbackend as a config
file (not touched with upgrades), and allow improvements to
/etc/rc.d/init.d/mythbackend to be included in upgrades.

The 'daemon' function provides a '--user' option, I don't run
mythbackend as root, adding a MYTHUSER variable and passing that to the
call to daemon works for me.

Is there really any need to start mythbackend only when X is running? 
# chkconfig: 345 90 10
will start in any multiuser mode.

Regards,


Stu.

PS. a hint for anyone else using RedHat 9 - not all of Myth plays well
with the new NPTL threading in the kernel/glibc with RedHat 9 (eg. UI
updates in mythmusic), starting the frontend with
LD_ASSUME_KERNEL=2.4.1 mythfrontend
will fallback to the earlier threading implementation (linuxthreads with
floating stacks).

On Wed, 2003-04-16 at 19:47, Mike Thomson wrote:
> Hi folks
> 
> Time to put back a tiny bit! I knocked up the following when I found out
> about the -d flag (daemon) on mythbackend. Hopefully others will find it
> useful. Perhaps Robert may want to add it into the docs for 0.9?
> 
> I've tested this on Mandrake 9.1. Please let me know of problems (with
> solutions if you can find one) with other distros / versions.
> 
> Three lines may need changed. I don't know of a way to robustly detect the
> location of the mythbackend binary, or to decide where the log file should
> go. Therefore I stuck 'em in as variables:
> 
>     # Name of the mythbackend binary
>     PROG="mythbackend"
> 
>     # Directory containing the mythbackend binary
>     LOCATION="/usr/local/bin"
> 
>     # Full path to the mythbackend binary
>     LOGFILE="/var/log/mythbackend.log"
> 
> The script needs to go in /etc/rc.d/init.d, with ownership root:root and
> permissions of 0744.  I configured it similarly to mysql:
> 
> root at mythpc # chkconfig --level 35 mythbackend on
> root at mythpc # /etc/rc.d/init.d/mythbackend start
> 
> Cheers
> Mike
> 
> 
> ______________________________________________________________________
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list