Answer the question
In order to leave comments, you need to log in
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
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.
Launch via screen.
Hooking to ssh, then hooking to screen - you get into the CLI of this process.
There should be separate entry points for the cli and for the service
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]
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 questionAsk a Question
731 491 924 answers to any question