• 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!

Restart Server command, TFS 1.2

katthult

Active Member
Joined
Jan 20, 2019
Messages
135
Reaction score
40
Hello there i'm searching for a script that restart my server by writing /restartserver for tfs 1.2
thanks
Kindly Regards Katthult
 

Attachments

  • auto_restarter.zip
    209 bytes · Views: 161 · VirusTotal
I usually doesn't share this information but you can easily install the npm package along with the pm2.
The pm2 can automatically restart any process under its chain, therefore all you have to do is create a talkaction to shutdown the server. When the process is closed the pm2 automatically opens it again.
 
I usually doesn't share this information but you can easily install the npm package along with the pm2.
The pm2 can automatically restart any process under its chain, therefore all you have to do is create a talkaction to shutdown the server. When the process is closed the pm2 automatically opens it again.

Say facts, that makes me happy to hear. I'll test it out tomorrow as I currently started using this restarter for my server save shutdown. 🙌
 
follow this tutorial, I had no trouble using it
Quick Start · PM2 (http://pm2.keymetrics.io/docs/usage/quick-start/)

basically just installs it and goes to the folder where tfs is and do:
-> pm2 start tfs.

to see the running processes you do -> pm2 ls
to restart automatically just tip -> pm2 restart tfs
also you can stop the automatically restarter by using -> pm2 stop tfs

Finally, to check the console of server you do -> pm2 log tfs --lines 30
where 30 is the number of lines you want to see.

Edit: the talkaction just have to have this line:
Game.setGameState(GAME_STATE_SHUTDOWN)

this will save and close the game (then pm2 will instantly restart it)
 
Back
Top