Slackware Startup Script

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #255
    Sax
    Participant

    Here’s the /etc/rc.d/rc.mt-daapd script i wrote.

    #!/bin/bash
    #
    # /etc/rc.d/rc.mt-daapd
    # slackware mt-daapd startup script
    # written by Chris Haynie chris[at]chrishaynie.com
    # May 09, 2006
    #
    # place in your /etc/rc.d directory, and chmod +x
    # then add the following to your /etc/rc.d/rc.local
    #
    # if [ -x /etc/rc.d/rc.mt-daapd ];then
    # . /etc/rc.d/rc.mt-daapd start
    # fi
    #

    start() {
    echo “Starting mt-daapd …”
    /usr/local/sbin/mt-daapd
    }

    stop() {
    echo “Stopping mt-daapd …”
    killall mt-daapd
    }

    case “$1” in
    ‘start’)
    start
    ;;

    ‘stop’)
    stop
    ;;

    ‘restart’)
    echo “Restarting mt-daapd…”
    stop
    start
    ;;
    *)
    echo “Usage $0 start|restart|stop”
    exit 1
    ;;
    esac

    Post edited by: Sax, at: 2006/05/10 03:53

    #4331
    fizze
    Participant

    Nice script, but you might want to add a delay after you stop/start the mt-daapd, not ?

    Post edited by: fizze, at: 2006/05/10 08:01

    #4332
    Sax
    Participant

    deplay… pardon?

    #4333
    fizze
    Participant

    delay of course….. since the killall mt-daapd might not work infinitly fast.

    something like “sleep 1”

    just to ensure the killall went thru properly before restarting mt-daapd.
    :rolleyes:

    #4334
    Sax
    Participant

    oh, it was a typo…well…never mind then 🙂 😀

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.