S
S
stsdc2016-05-05 21:22:25
linux
stsdc, 2016-05-05 21:22:25

How to open CLI via SSH without restarting the program?

For example, there is a program that starts at startup and this program has a CLI . How to open this CLI via SSH without restarting the program.
What should the architecture of such a program look like?
What do you need to know to write such a program?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Saboteur, 2016-05-06
@stsdc

You don't need to write architecture.
What you want to do is already done by the screen managers - screen and tmux - use them. If you're interested, check out how they're written.
But adding such functionality to your program is not the Linux way if there are already ready-made tools.

M
Melkij, 2016-05-05
@melkij

Launch via screen.
Hooking to ssh, then hooking to screen - you get into the CLI of this process.

D
Dmitry Belyaev, 2016-05-05
@bingo347

There should be separate entry points for the cli and for the service

S
ShamblerR, 2015-06-15
@Dimensi

For starters, you're doing some bullshit.
most likely you are doing something initially wrong
1. you still have index.php in the url and this is not correct
2. you do not have CNC links in the form of ordinary IDs, which is also not correct.
3.
As far as I understand, you have index.php/text/ID
, so we write the rule

RewriteCond %{REQUEST_URI} ^(index.php/.*/[0-9{1,}]/)(.*)
 RewriteRule . %1 [R=301,L]

Now everything that comes after the ID, in particular, numbers from 0-9 from 1 piece to infinity, after them everything will be deleted.

V
Viktor Savchenko, 2015-06-11
@UAPEER

Use NGINX in front of Apache, not only to solve such problems, but also to cache and speed up the site. Write just a couple of lines like this:
location =/index.php/ {
return 301 /coID/1;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question