#!/bin/bash # # daapd rc script for linux/sysv init by mykle hansen # version 1.0 2004.02.17, # with modifications 2004.04.15 alexander oberdoerster # adjust if necessary to find daapd and mDNSResponderPosix # PATH="$PATH:/sys/usr/local/var/opt/etc/sbin" # adjust if necessary so daapd can find all its libs export LD_LIBRARY_PATH=/usr/local/lib # where your mp3s live; can be multiple directories seperated by spaces. MP3DIR="/stuff/mp3"; # your preferred logfile location LOGFILE="/var/log/daap" # run daapd on this port (default is 3689) PORT=3689 # comment this out to make daapd more aloof. #VERBOSE="-v" # comment this out to make daapd more sluggish. CACHE="-C /tmp/daapd.cache" # these can be the same name, but don't leave either blank. SERVERNAME="daapd server" case "$1" in start) echo "Starting daapd ..." nohup daapd $VERBOSE -n "$SERVERNAME" -p $PORT $CACHE $MP3DIR > $LOGFILE 2>&1 & disown %1 stop) killall daapd ;; esac