Re: SOLVED: inetd vs console calling a script

2012-10-12 Thread Gary Stainburn
On Thursday 11 October 2012 20:53:08 Andy Bach wrote: > On Thu, Oct 11, 2012 at 4:36 AM, Gary Stainburn > > wrote: > >> Is there a quick and easy way to detect which method called it? > > > > my $xinetd=(defined $ENV{REMOTE_HOST}); > > MIght be interesting to see what else is set in the environmen

Re: SOLVED: inetd vs console calling a script

2012-10-11 Thread Andy Bach
On Thu, Oct 11, 2012 at 4:36 AM, Gary Stainburn wrote: >> Is there a quick and easy way to detect which method called it? > > my $xinetd=(defined $ENV{REMOTE_HOST}); MIght be interesting to see what else is set in the environment, adding something like: warn("$_ -> $ENV{$_}\n") foreach keys %ENV;

SOLVED: inetd vs console calling a script

2012-10-11 Thread Gary Stainburn
On Thursday 11 October 2012 10:22:04 Gary Stainburn wrote: > Hi folks. > > I've got a server script that I call via xinetd. I occasionally call it > from the command line too, but now want it to handle the interactions > differently depending on how it's called. > > Is there a quick and easy way to

inetd vs console calling a script

2012-10-11 Thread Gary Stainburn
Hi folks. I've got a server script that I call via xinetd. I occasionally call it from the command line too, but now want it to handle the interactions differently depending on how it's called. Is there a quick and easy way to detect which method called it? Gary -- Gary Stainburn Group I.T. M