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: