Executing script on receiving incoming connection with xinetd

喜夏-厌秋 提交于 2019-11-29 08:13:35
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)

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!