• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Debian/Ubuntu: Start your OT server through SSH (and keep it running)

Recadra

New Member
Joined
Jul 12, 2008
Messages
70
Reaction score
3
If you have a dedicated server running Linux but the server is not located at home (in a data centre, for example), you might know the problem with starting your OT through SSH. As soon as you disconnect, the OT shuts down. The best way to avoid your OT from shutting down, is a program called "screen".

*Get the program with
Code:
aptitude install screen

*After screen is installed, start it by typing
Code:
screen

*Get into your OT's directory. In case you don't have a restart script yet, create one. Here's the script:
Code:
#!/bin/bash
while true
do
./TheForgottenServer
done

*Start the restart script.

*Press Ctrl + A followed by D to detach the screen.

You can disconnect your SSH session now, without the OT to shut down. :)

If you want to get back to see how the OT is doing, or to shut it down, simply get back into your screen session with
Code:
screen -r

To close the screen, just get inside the screen and type
Code:
exit

If screen is being annoying (it is, sometimes), you can kill screen by attaching a window and entering Ctrl + A and then Ctrl + \

Good luck :)
 
easier way yes, but there is no way to see the console and possible errors then

I've been using screen for a long time, but I recently started to use nohup because I cant see old output in screen (scroll up), do you have any idea how to do that? I think nohup is better to use for applications which dont use ncurses like TFS, screen is good for applications which use ncurses like irssi, finch etc.
 
I've been using screen for a long time, but I recently started to use nohup because I cant see old output in screen (scroll up), do you have any idea how to do that? I think nohup is better to use for applications which dont use ncurses like TFS, screen is good for applications which use ncurses like irssi, finch etc.

hehe now tfs 0.3 saving logs before it was really bad that u cannot see the logs throught screen .
 
You could....
#!/bin/bash
while true
do
./TheForgottenServer > ./data/output.log
done

But, how to compile TFS 0.3.4 to create logs ?
 
where add this script?' only in shell? or i need a create file??

thanks

PHP:
*Get into your OT's directory. In case you don't have a restart script yet, create one. Here's the script:
Code:

#!/bin/bash
while true
do
./TheForgottenServer
done
 
I know it's old thread, but there is sth like "tee", " > ", " >> " if anyone want create log of running process.

Code:
 ./TheForgotterServer 2>&1 | tee /path/tfs.log
 
Back
Top