init script

    Jake Graft pointed out in a comment that I had forgotten to put the init script from the MythTV book online. My apologies.
    #! /bin/sh
    #
    # mythbackend
    #
    
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    
    BACKEND=/usr/local/bin/mythbackend
    BACKEND_NAME=mythbackend
    
    MYTHUSER="myth"
    
    test -x $BACKEND || exit 0
    
    set -e
    
    case "$1" in
      start)
            echo -n "Starting MythTV: $BACKEND_NAME"
            su ${MYTHUSER} -c "$BACKEND -v all -d -l ${MBE_LOGFILE}" &
            echo "."
            ;;
      stop)
            echo -n "Stopping MythTV: $BACKEND_NAME"
            killall $BACKEND
            echo "."
            ;;
      *)
            echo "Usage: $0 {start|stop}" >&2
            exit 1
            ;;
    esac
    
    exit 0
    


    Tags for this post: mythtv book init script
    Related posts: Building a symlink tree for MythTV recordings; Rsyncing everything but the data

posted at: 17:53 | path: /mythtv/book | permanent link to this entry