I have have installed xinetd, and I wrote a script:
#!/bin/bash
echo "Some text"
touch /home/somefile
I made a service configuration under /etc/xinetd.d/
and basically it works
when I connect to localhost under the configured port, because: The file somefile
gets generated by the touch command on connection to the service. I connect with telnet:
telnet localhost someport
What I don't understand is that telnet does not output the string "Some text". What can I do to make this work?
Heres the xinetd service configuration file in /etc/xinetd.d/:
# This is the configuration for the tcp/stream echo service.
service my_service_name #not in /etc/services
{
# This is for quick on or off of the service
disable = no
# The next attributes are mandatory for all services
id = my_custom_id
type = UNLISTED
wait = yes
socket_type = stream
protocol = tcp
# External services must fill out the following
user = root
# group =
server = /usr/bin/program_name_here
# server_args =
# External services not listed in /etc/services must fill out the next one
port = 60001
}