0

I have a program that needs to be automatically started when I boot a CentOS server.

After the program has been started, I want to be able to SSH into the server and control this program (read its output and send it input).

I have been trying to use Named Pipes for this purpose, but I've not been able to work out how to do so.

How can I accomplish this type of control?

iWiggins
  • 103
  • 2

1 Answers1

1

Can you start the process inside screen and then connect to the screen session after boot?

I usually do something like this from within rc.local on Ubuntu. I use at to launch it so if the launched process doesn't exit cleanly, it doesn't terminate the execution of rc.local:

echo '/usr/bin/screen -dmS my_proc /root/someprocess' | at now 

Then ssh in later and issue screen -x my_proc Just be sure you don't kill the screen session (detach from screen, don't exit)

Server Fault
  • 3,714
  • 12
  • 54
  • 89