How to Enter Program Administration to a service that is already running?
3 hours ago, dj_ripcord said:Yep this would work! That is.... if the server wasn't already running. I tried using rptyer to attach it to a new terminal but I was either unable to find the PID of the server or it would not give me permission. Even as sudo.
to use a screen emulator, it needs to be started from screen/tmux first, in order to connect to the session.
the ID is not the process id of the server, its the tmux session id.
So you'd need to run ps aux | grep terraria to find the PID of the terraria server, and then kill -9 <pid> to terminate the current terraria server.
Then restart it within a tmux session.
You might be interested in this, which shows how to set it up with Screen as a systemd service https://www.linode.com/docs/game-servers/host-a-terraria-server-on-your-linode/
That way you can start/stop it using the 'service terraria start/stop' command.
Basic screen commands are
screen -r (to attach, if you only have a single screen session)
screen -ls (list screen sessions)
screen -r pid/name (to attach a specific screen when more than 1 session)
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now