Re: Any way to do this with xinetd?

Steve G <[email protected]> Tue, 30 Sep 2003 16:59:25 -0700 (PDT)
Newsgroups gmane.network.xinetd
Message-ID <[email protected]>
>I was just wondering if there was a way to make xinetd listen 
>for a connection, not accept it, release the port, start the
>server, wait, rebind to the port when the server ends, and 
>starting listening again.

You've almost described what xinetd does. :)

What's your daemon? Its easier to help when I know what you are
trying to do. Basically, disable your daemon from starting up in
the init scripts & kill all instances of it, then fill in a
service configuration in the /etc/xinetd.d directory. Your
xinetd.conf file probably has an includedir directive that is
/etc/xinetd.d. And restart xinetd.

To get a service running, you need to know only a couple of
things. First is whether or not its tcp or udp. If its tcp, then
wait = no, if its udp wait = yes. Is it a known service? if not
flags = unknown and you have to have a port directive.
socket_type = stream or udp based on above info.

server, socket_type, wait, & user are the minimum...you may need
port and flags, too.

-Steve Grubb

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com