Is there any port of start-stop-daemon for OS X? I am trying to use some init.d script under OS X and I while some are just working properly, I discovered quite a few that to rely on /sbin/start-stop-daemon and I am looking for a port of it for OS X.

Any ideas?

Note, I know that OS X does not have support for init.d but there is nothing stoping you from using it to start/stop some services. It is much easier to install things like postgres, nginx using brew and control them using the usual service name start|stop|restart.
You need to look at launchd which uses *.plist setup files in:

/Library/LaunchAgents/, /Library/LaunchDaemons/ and ~/Library/LaunchAgents/

Under /System/Library/LaunchAgents/ and /System/Library/LaunchDaemons/ are the ones provided by Mac OS X.

When you e.g. install postgresql form Macports, there will also be installed an org.macports.postgresql93-server.plist file under /Library/LaunchDaemons/ (it is a link to a .plist file which is installed under /opt/local/etc/LaunchDaemons/org.macports.postgresql93-server), but the daemon isn't enabled at install.

The content of this .plist file is (the key &lt;key&gt;Disabled&lt;/key&gt;&lt;true/&gt; need to be set to false, if you need to enable the daemon):

&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" &gt;
&lt;plist version='1.0'&gt;
&lt;dict&gt;
&lt;key&gt;Label&lt;/key&gt;&lt;string&gt;org.macports.postgresql93-server&lt;/string&gt;
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;/opt/local/bin/daemondo&lt;/string&gt;
    &lt;string&gt;--label=postgresql93-server&lt;/string&gt;
    &lt;string&gt;--start-cmd&lt;/string&gt;
    &lt;string&gt;/opt/local/etc/LaunchDaemons/org.macports.postgresql93-server/postgresql93-server.wrapper&lt;/string&gt;
    &lt;string&gt;start&lt;/string&gt;
    &lt;string&gt;;&lt;/string&gt;
    &lt;string&gt;--stop-cmd&lt;/string&gt;
    &lt;string&gt;/opt/local/etc/LaunchDaemons/org.macports.postgresql93-server/postgresql93-server.wrapper&lt;/string&gt;
    &lt;string&gt;stop&lt;/string&gt;
    &lt;string&gt;;&lt;/string&gt;
    &lt;string&gt;--restart-cmd&lt;/string&gt;
    &lt;string&gt;/opt/local/etc/LaunchDaemons/org.macports.postgresql93-server/postgresql93-server.wrapper&lt;/string&gt;
    &lt;string&gt;restart&lt;/string&gt;
    &lt;string&gt;;&lt;/string&gt;
    &lt;string&gt;--pid=none&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;Debug&lt;/key&gt;&lt;false/&gt;
&lt;key&gt;Disabled&lt;/key&gt;&lt;true/&gt;
&lt;key&gt;KeepAlive&lt;/key&gt;&lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;