[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: leafnode on macosx



* Martin Smith on Wednesday, December 17, 2008 at 19:47:03 +0000
> I have installed leafnode via macports and I am looking for some 
> guidance as to how to get it running as a service via launchd, which I 
> think is the correct way to do it these days.
> I am fairly new to osx, but have run it for many years on FreeBSD.
> Any help greatly appreciated, thanks

Some extra distributions like fink still make leafnode a
StartupItem, eg. because it's easier to turn off. However, that
being said, the following setup works fine for me:

$ cat /Library/LaunchDaemons/org.leafnode.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
	"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">

<!--$Id: org.leafnode.plist,v 9581788c5b00 2007-08-22 14:20 +0200 blacktrash $-->

<dict>
        <key>Label</key>
        <string>org.leafnode</string>
        <key>Program</key>
        <string>/usr/local/sbin/leafnode</string>
        <key>ProgramArguments</key>
        <array>
                <string>leafnode</string>
        </array>
        <key>Sockets</key>
        <dict>
                <key>Listeners</key>
                <dict>
                        <key>Bonjour</key>
                        <true/>
                        <key>SockServiceName</key>
                        <string>nntp</string>
                </dict>
        </dict>
        <key>UserName</key>
        <string>news</string>
        <key>inetdCompatibility</key>
        <dict>
                <key>Wait</key>
                <false/>
        </dict>
</dict>
</plist>

Then:

$ sudo launchctl load /Library/LaunchDaemons/org.leafnode.plist
$ sudo launchctl start org.leafnode

To stop:

$ sudo launchctl stop org.leafnode
$ sudo launchctl unload /Library/LaunchDaemons/org.leafnode.plist

You might want to keep a backup of org.leafnode.plist somewhere
in case system updates accidentially fiddle with it.

c
-- 
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/