On Fri, 2004-09-24 at 18:19, Michael Thompson wrote: > Any urls/snippets of this process would be very interesting to me, and > I'm sure the rest of the list as well! :)
There's not a lot of info about writing your own xinetd services because
they're just normal programs that read/write from standard in and
standard out. You just need to make a file for your program in
/etc/xinetd.d specifying the xinetd options for it, like tcp/udp, socket
or datagram. The xinetd.conf(5) man page will help with this.
You can even do something silly like make cat a service. I made a file
called /etc/xinetd.d/cat with this in it:
# default: off
# description: reprints input with line numbers
service cat
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = someuser
server = /bin/cat
server_args = -n
}
Also had to add this to the bottom of /etc/services to specify the port:
cat 31400/tcp
Then restart xinetd and do a
$ telnet localhost 31400
shows runs cat and numbers your lines of input. This isn't really
useful, just an example. Note you have to manually break your telnet
session with Ctrl+] for this example.
There are plenty of pages about configuring options for xinetd. Check
out xinetd.org or search at tldp.org.
-Tim
--
Timothy A. Chagnon <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
-- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
