I want xinetd to execute a shell script when a connection is received on a certain port. To accomplish this, followed this tutorial: [enter link description here][1]
It works perfectly fine for me trying on localhost. Can you do a
tail -f /var/log/syslog | grep xinetd
while restarting the xinetd service? Also try running nc on the same host where you have xinetd and see if it works on localhost.
service testservice
{
port = 5900
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/testscript.sh
server_args = test
}
You're right, I couldn't get yours to work. The above seemed to.
Make sure that testscript.sh is set +x and at the top contains #!/bin/sh (in your example it does appear that way)