• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Linux CentOS 7 Auto Restarter/Starter

7804364

Member
Joined
Mar 6, 2010
Messages
457
Reaction score
10
Hey i was wondering how i can add/make an auto restarter so the server will restart every so ofter, and if the server crashes, it will restart
 
Code:
#!/bin/bash
# restarter script
main() {
while [ 1 ]; do
./tfs > output
done
}
pkill tfs
main

This is a bash script. Put it a file ending in .sh and execute it.

It will start/restart whenever it goes off either by a crash or a programed restart in the game.
 
Code:
#!/bin/bash
# restarter script
main() {
while [ 1 ]; do
./tfs > output
done
}
pkill tfs
main

This is a bash script. Put it a file ending in .sh and execute it.

It will start/restart whenever it goes off either by a crash or a programed restart in the game.
ok so should i use screen, then start the bash script?
 
Back
Top