Reply To: mt-daapd startup question

#15914
rpedde
Participant

@wwarren wrote:

I have Firefly installed and running correctly on my Mybook, but frankly, I don’t really understand Linux too well and had a question about the S99Firefly file that’s in the /etc/init.d/ directory.

I wanted to start a second instance of mt-daapd, and thought editing the S99Firefly script was the proper way to do that. But looking at the script, I’m not clear on WHY this file gets executed during bootup. Is that directory kind of an autostart thing where anything there gets run on bootup? That’s my interpretation, but I don’t see how the S99Firefly script does anything unless its passed a start/stop/restart parameter.


start() {
echo “Starting Firefly”
/usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
/usr/local/sbin/mt-daapd -c /etc/mt-daapd1.conf
}

Walter

This is a traditional unix startup script. Well, sort of… it’s a traditional SysV startup script (more info).

Basically, in the startup directory are a bunch of startup/shutdown scripts. On system bootup, the init process runs through all the files in the startup direcory and runs them with a “start” argument, and when it shuts down, it runs them with a “stop” argument.

It’s a little more complex than that, but not much.

But yeah, that’s the right way to do it.

— Ron