• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

call a program as an inetd service

Hi,
   i am searching a way to call a program through inetd. I do not know if  i can use a script so that the inetd calls as service the correspond script and the script then calls the program. Nevertheless i would appreciate a help on this puzzle.

   Regards,
     Teo.
0
ttsenis
Asked:
ttsenis
1 Solution
 
ahoffmannCommented:
any executable can be called from inetd, as long as it does not  access ttys and terminates succesfull
0
 
ttsenisAuthor Commented:
Well to be more precise my main interest is to run the program through an inetd script so in case of a program failure (program terminates) to restart it again. So the main interest is to run a script as a daemon and the script to call the program. In a case descriped above do i still have the limitation of not accessing the ttys. Also a second matter is the port. Does inetd calls the script in case a demand appears at the specified port, are it calls it at boot time.

   Regards Teo.
0
 
ahoffmannCommented:
> .. program failure (program terminates) to restart it again.
that's what inetd is for !

> Does inetd calls the script in case a demand appears at the specified port?
yes

>  are it calls it at boot time.
depends, see above
0
 
arn0ldCommented:
"so in case of a program failure (program terminates) to restart it again. "

are the progam(s) to be restarted network apps?
0
 
jlevieCommented:
Hmmm, inetd only runs a program when a connection is opened to the port associated with the service. So if the program is managed by inetd it will only be started when someone connects to the port. If the program exits for some reason inetd will not re-start it until the next incoming connection. If your goal is just to always have this program running you need to look into running it from inittab.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now