You are here: Home » Topic » mt-daapd startup for OSX

mt-daapd startup for OSX

This topic contains 2 replies, has 2 voices, and was last updated by  eddieb 12 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #143

    eddieb
    Participant

    I noticed the startup code for RHEL4.
    This is mine for OSX. Hope it helps … 🙂
    NON-Apple startups need to be in /Library/StatupItmes. my mp3s are on a 2nd disk, so, requires “Disks” …

    cat /Library/StartupItems/mt-daapd/StartupParameters.plist
    {
    Description = "mt-daapd server";
    Provides = ("mt-daapd"«»);
    Requires = ("Disks","Network","Resolver"«»);
    Uses = ("Network","mDNSResponder"«»);
    OrderPreference = "Late";
    Messages =
    {
    start = "Starting mt-daapd service";
    stop = "Stopping mt-daapd service";
    restart = "Restarting mt-daapd service";
    };
    }

    and


    cat /Library/StartupItems/mt-daapd/mt-daapd
    #!/bin/sh

    ##
    # Start mt-daapd Daemon
    ##
    . /etc/rc.common

    StartService ()
    {
    if [ "${MTDAAPDSERVER:=-NO-}" = "-YES-" ]; then
    ConsoleMessage "Starting mt-daapd Server service"
    # echo "Starting mt-daapd Server service"
    /usr/local/sbin/mt-daapd 2>&1 >>/var/log/mt-daapd.startup.log
    fi
    return 0
    }

    StopService ()
    {
    ConsoleMessage "Stopping mt-daapd Server Daemon"
    # echo "Stopping mt-daapd Server Daemon"
    ps -ax | awk '{print $1" " $5" " $6}' | awk '//usr/local/sbin/mt-daa
    pd/ {print $1}' | xargs kill -INT
    return 0
    }

    RestartService ()
    {
    if [ "${MTDAAPDSERVER:=-NO-}" = "-YES-" ]; then
    ConsoleMessage "Restarting mt-daapd Server Daemon"
    # echo "Restarting mt-daapd Server Daemon"
    ps -ax | awk '{print $1" " $5" " $6}' | awk '//usr/local/sbin/mt
    -daapd/ {print $1}' | xargs kill -HUP
    else
    StopService
    fi
    }

    RunService "$1"

    :y32b4:

    #3867

    rpedde
    Participant

    Can you email that to me at ron at pedde.com? I’ll put it in the contrib section (and credit you, of course)

    — Ron

    #3868

    eddieb
    Participant

    done … :laugh:

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.