You are here: Home » Topic » Linux mt-daapd startup script help needed

Linux mt-daapd startup script help needed

This topic contains 1 reply, has 2 voices, and was last updated by  fizze 8 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2703

    wwarren
    Participant

    I have an mt-daapd.conf file and an mt-daapd2.conf file that specify different port numbers and different libraries. How should I edit the start portion of the Linux Firefly launch script to start two instances that use those separate config files?

    stopd() {
    echo -n “Stopping $DESC: “
    start-stop-daemon –stop –quiet –pidfile /var/run/$NAME.pid
    –signal 2 –exec $DAEMON –oknodo
    echo “$NAME.”
    counter=0
    seen=0
    while pidof mt-daapd >/dev/null && [ $counter -lt 15 ]; do
    if [ $seen -eq 0 ]; then
    echo -n “Waiting for mt-daapd to terminate…”
    seen=1
    fi

    counter=$(($counter + 1))
    echo -n “.”
    sleep 1
    done
    echo “OK, all clear.”
    }
    startd() {
    echo -n “Starting $DESC: “
    start-stop-daemon –start –quiet -m –pidfile /var/run/$NAME.pid
    –exec $DAEMON — $DAEMON_OPTS 2>/dev/null
    echo “$NAME.”
    }

    Do I need to do anything to the stop portion so both instances get stopped?

    The script I used on an old Mybook installation was easier to understand:
    start() {
    echo “Starting Firefly”
    /usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
    /usr/local/sbin/mt-daapd -c /etc/mt-daapd2.conf
    }
    stop() {
    echo “Stopping Firefly”
    killall mt-daapd > /dev/null 2>&1
    }

    #17913

    fizze
    Participant

    That has been discussed already.
    Search for multiple instances or something like that 😉

    The key part is to specify different ports in the config.

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

You must be logged in to reply to this topic.