[launchd-dev] bitlbee - xinetd to launchd

Johannes Kneer jkneer at n8geil.de
Thu Nov 1 15:44:20 PDT 2007


Hi

My problem boils down to porting this xinetd file to launchd:

# default: off
# description: Bitlbee is an IRC gateway to other networks.
service ircd
{
         type            = UNLISTED
	socket_type	= stream
	protocol	= tcp
	wait		= no
	user		= bitlbee
         group           = nogroup
	server		= /sw/sbin/bitlbee
         port            = 6667
	disable		= no
         log_on_failure  += USERID
}

So this is what I have come up with:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd 
">
<plist version="1.0">
<dict>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>org.bitlbee.bitlbee</string>
	<key>OnDemand</key>
	<true/>
	<key>ProgramArguments</key>
	<array>
		<string>/sw/sbin/bitlbee</string>
	</array>
	<key>ServiceDescription</key>
	<string>bitlbee irc-im proxy</string>
	<key>Sockets</key>
	<dict>
		<key>Listener</key>
		<dict>
			<key>SockFamily</key>
			<string>IPv4</string>
			<key>SockProtocol</key>
			<string>TCP</string>
			<key>SockServiceName</key>
			<string>6667</string>
			<key>SockType</key>
			<string>stream</string>
		</dict>
	</dict>
	<key>inetdCompatibility</key>
	<dict>
		<key>Wait</key>
		<false/>
	</dict>
	<key>UserName</key>
	<string>bitlbee</string>
</dict>
</plist>



And well it does not work. When I try to load (launchctl load  
thisfile.plist) I always get a "bind(): Operation not permitted" error  
and I can't connect to the server.
And how would I restrict the service to localhost only?

I guess I'm missing something. I'd just like to have bitlbee working  
in leopard. Would apreciate some help.

Johannes



More information about the launchd-dev mailing list