i have created this BASH script called blah which does something simple like this (See below)
#./blah -x "bindas"
hello bindas
i would like to execute script using xinetd with dynamic variable, something similar to below example
#telnet localhost 809 "bindas"
hello bindas.
i am not going to use it with telnet, actually some other application will try to communicate with this server on 809 port. How can i arrange my xinetd file to take arguments? i found server_args can take parameters but how about something like this, will this work?
# This file is being maintained by Puppet.
# DO NOT EDIT
service cont_blah
{
port = 809
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
group = root
groups = yes
server = /usr/local/bin/blah
server_args = -x $1
}