-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't find a way to run command inside session from script #19
Comments
Does
|
I did see the -n switch, but the problem is that it tries to create a new socket, while I wanted it to attach to an already existing one. I could maybe delete the socket and make it again, but that doesn't seem like a very elegant and practical solution. |
That is analogous to
Note that dtach is not a multiplexer: each socket controls exactly one session. Each session starts exactly one command, and exits when that command exits. When you talk about an "existing one", that socket is for talking to a session which already has a program running in it. Could you provide more details? What core problem are you trying to solve with dtach? |
I realize, but all I want to do is connect to a session and execute a script without having any other commands running or computers connected to said session
I'm trying to restart a minecraft server. to do this my plan was to periodically run a script that stops it, connects to the session that was running the server and makes backups, updates stuff and starts the server again before disconnecting from the session. |
hey @jan-sopi I'm not particularly familiar with But can you do it like the example from the
|
Actually, it sounds like OP was trying to connect to a "session" after the "minecraft server" had exited. This would normally mean that the socket had been deleted by Reading it again I think they have started dtach with a NB: I don't think this server will redraw the screen on reconnection so I personally would use |
Hi, I couldn't find any way to attach to a session and execute a command from a script. I tried searching for help or trying out stuff on my own, but nothing work, is there no way to do this? I found that screen has the -dm switches that serve for this purpose, so it'd be nice to have something similar.
The text was updated successfully, but these errors were encountered: