[mythtvnz] Opensuse 11.3 64 bit starting mythbackend

Nathan Cook nathan at cook.net.nz
Sat Aug 7 07:54:24 BST 2010


Hi, mythbackend can't start when running it from system services, I get the
following error:

/etc/init.d/mythbackend start returned 6 (program is not configured):

the mythbackend file exists.

I've opened the file and it seems to want to run this:


# Check for existence of needed config file and read it

MYTHBACKEND_CONF=/etc/sysconfig/mythbackend

test -r $MYTHBACKEND_CONF || { echo "$MYTHBACKEND_CONF not existing";

        if [ "$1" = "stop" ]; then exit 0;

        else exit 6; fi; }

When I look for /etc/sysconfig/mythbackend it does not exist.

any help appreciated as to where the sysconfig/mythbackend file should be?

Thanks

Nathan

Here's the rest of the init.d script:

#! /bin/sh

### BEGIN INIT INFO

# Provides:          mythbackend

# Required-Start:    $syslog $remote_fs mysql

# Should-Start:      $time

# Required-Stop:     $syslog $remote_fs mysql

# Should-Stop:       $time

# Default-Start:     3 5

# Default-Stop:      0 1 2 6

# Short-Description: MythTV backend daemon

# Description:       Start the MythTV backend daemon

### END INIT INFO


MYTHBACKEND_BIN=/usr/bin/mythbackend

test -x $MYTHBACKEND_BIN || { echo "$MYTHBACKEND_BIN not installed";

if [ "$1" = "stop" ]; then exit 0;

else exit 5; fi; }


# Check for existence of needed config file and read it

MYTHBACKEND_CONF=/etc/sysconfig/mythbackend

test -r $MYTHBACKEND_CONF || { echo "$MYTHBACKEND_CONF not existing";

if [ "$1" = "stop" ]; then exit 0;

else exit 6; fi; }


. $MYTHBACKEND_CONF


: ${MYTHBACKEND_USERID:=mythbackend}

: ${MYTHBACKEND_GROUPID:=video}

: ${MYTHBACKEND_HOME:=$(eval echo -n ~${MYTHBACKEND_USERID})}


. /etc/rc.status


# Reset status of this service

rc_reset


case "$1" in

    start)

echo -n "Starting MythTV backend"

touch /var/log/mythtv/mythbackend.log

chown ${MYTHBACKEND_USERID}.${MYTHBACKEND_GROUPID}
/var/log/mythtv/mythbackend.log

HOME=${MYTHBACKEND_HOME} /sbin/startproc \

-u ${MYTHBACKEND_USERID} -g ${MYTHBACKEND_GROUPID} \

-p /var/run/mythbackend.pid $MYTHBACKEND_BIN --daemon \

--logfile /var/log/mythtv/mythbackend.log $MYTHBACKEND_OPTIONS

rc_status -v

;;

    stop)

echo -n "Shutting MythTV backend"

/sbin/killproc -TERM $MYTHBACKEND_BIN

rc_status -v

;;

    try-restart|condrestart)

if test "$1" = "condrestart"; then

echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart
${warn}(RH)${norm}"

fi

$0 status

if test $? = 0; then

$0 restart

else

rc_reset # Not running is not a failure.

fi

rc_status

;;

    restart)

$0 stop

$0 start


rc_status

;;

    force-reload)

echo -n "Reload service MythTV backend"

/sbin/killproc -HUP $MYTHBACKEND_BIN

#touch /var/run/mythbackend.pid

rc_status -v


## Otherwise:

#$0 try-restart

#rc_status

;;

    reload)

# If it supports signaling:

echo -n "Reload service MythTV backend"

/sbin/killproc -HUP $MYTHBACKEND_BIN

#touch /var/run/mythbackend.pid

rc_status -v

 ## Otherwise if it does not support reload:

#rc_failed 3

#rc_status -v

;;

    status)

echo -n "Checking for service MythTV backend"

/sbin/checkproc $MYTHBACKEND_BIN

rc_status -v

;;

    probe)

test $MYTHBACKEND_CONF -nt /var/run/mythbackend.pid && echo reload

;;

    *)

echo "Usage: $0
{start|stop|status|try-restart|restart|force-reload|reload|probe}"

exit 1

;;

esac

rc_exit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ourshack.com/pipermail/mythtvnz/attachments/20100807/2ce08ce6/attachment-0001.htm 


More information about the mythtvnz mailing list