Automating startup of Darwin Streaming Server

Recently I have been using Darwin Streaming Media Server for some small movies. However, I quickly found out that when I rebooted the server Darwin does not automatically start up with it. It was necessary to start it manually each time the server was rebooted or started. Needless to day I find this very inconvenient. So I decided to write a startup script. It was really very easy, as you will see below.

I am using Fedora Core 4 and did a normal install of Darwin 5.5 from Apple.

Then I added the following script as the directory /etc/rc.d/init.d/darwinssd with darwinssd being the filename, not a directory.
You will need to be superuser in order to write to this directory.

# created by Adam Culp of Unique Web Sites, Inc.
# at
# darwinssd     Startup script for the Darwin Streaming Server
# chkconfig: 345 85 15
# description: Darwin Streaming Server startup/shutdown script
# processname: darwinssd
# pidfile: /var/run/


# Source function library.
. /etc/rc.d/init.d/functions

case "$1" in
echo -n "Starting Darwin Streaming Server[darwinssd]: "
daemon $darwinssd
touch /var/lock/subsys/darwinssd
echo -n "Shutting down Darwin Streaming Server[darwinssd]: "
killproc $darwinssd
rm -f /var/lock/subsys/darwinssd
rm -f /var/run/
status $darwinssd
$0 stop
$0 start
echo -n "Reloading darwinssd: "
killproc $darwinssd -HUP
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1


exit 0

Of course you will also need to change the permissions on the file darwinssd to be -rwxr-xr-x (or 755).

At this point you can treat darwinssd as if it was any other daemon. You can add it to the starup with:(must be root user for this command)

chkconfig darwinssd on

As a superuser you would type it as:

/sbin/chkconfig darwinssd on

It also has other features such as start, stop, restart, and reload.
The same applies here for any of these commands:

service darwinssd restart

or as superuser

/sbin/service darwinssd restart
, ,

2 responses to “Automating startup of Darwin Streaming Server”

  1. I get this terminal response whenever I try to start, stop, restart, etc, using your script:
    “env: /etc/init.d/darwinssd: No such file or directory”

    Any ideas?

    I have full root and have tried both “service darwinssd restart” and “/sbin/service darwinssd restart”.

  2. Hi Adam,

    First off I want to thank you for instructions on automating the Darwin Streaming Server startup process. That was very helpful!

    Now I have another question for you. I have DSS installed, however, I need to install it on multiple servers and so I’m looking to automate the installation of the server. I’m able to download and install the server automatically, but the part that I can’t figure out is how to automate the web admin section. I was wondering if you could help me out in this area.