Xinetd

Created Monday 22 September 2014

http://gonzalo123.com/2010/05/23/building-network-services-with-php-and-xinetd/

/etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info

# disable = yes # wasn't commented
}

includedir /etc/xinetd.d

/etc/xinetd.d/yourservice
# default: on
# description: the service
# very good service
service yourservice
{
disable = no
socket_type = stream
wait = no
log_type = SYSLOG daemon info
protocol = tcp
user = www-data
server = /usr/bin/php
server_args = /path/to/your/file.php
}

/etc/services
...
yourservice 1234/tcp # your service
...



Backlinks: