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
    
    


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

    Add a comment to this post:

    Your name:

    Your email: Email me new comments on this post
      (Your email will not be published on this site, and will only be used to contact you directly with a reply to your comment if needed. Oh, and we'll use it to send you new comments on this post it you selected that checkbox.)


    Your website:

    Comments: