I've prepared a script that accepts a request on a server port, then process user input, provides an output through the same port and then dies. The script is not always running but starts when a a certain port is open by the client. The (working) configuration on my Linux machine is this one:
/etc/services
test_socket 9876/tcp # TestSocket
/etc/xinetd.d/test_socket
# default: on
# description: blah blah blah
service test_socket
{
port = 9876
socket_type = stream
protocol = tcp
wait = no
user = root
server = /export/home/stefano/do_something.php
instances = 20
}
Once a client open port :9876, the 'do_something.php' script starts accepting incoming message, process it and give a result as output before to die and close communication.
I would like to migrate/replicate the above architecture to Solaris 10 machine.
For the purpose I've configured the same value on same services file:
/etc/services
test_socket 9876/tcp # TestSocket
But then... being the inetd.d dismissed on Solaris10 and replaced by svc, how can I create a manifest to reproduce the same behavior?
I've tried to search documentation but I wasn't able to find out anything that has start on demand when client ask to communicate through server port.
Can anybody help me?