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

Auto Re-Open server after global save

kennyubuntu

Member
Joined
May 20, 2016
Messages
150
Reaction score
13
How to make it on ubuntu:

- when global save (7:00)
- restart the ubuntu machine
- and re open server

What is the best way?

Code:
[6:55:03.589] > Broadcasted message: "Server is going down for a global save within 5 minutes. Please logout.".
[6:57:03.590] > Broadcasted message: "Server is going down for a global save within 3 minutes. Please logout.".
[6:59:03.590] > Broadcasted message: "Server is going down for a global save in one minute, please logout!".
[7:0:03.791] PLAYERS has logged out.
[7:0:04.181] > Saving server...
[7:0:05.537] > SAVE: Complete in 1.356 seconds using relational house storage.
[7:0:05.987] Preparing to shutdown the server- done.
kenny@kenny-DC8CU41:~/Documentos/server$ ./tfs
 
Last edited:
So I added everything on cron, tested it closes the server but auto start doesn't start it

both in crontab:
Code:
36 6 * * * /sbin/shutdown -r now
@reboot /home/darth/restarter.sh

Inside of restarter.sh:
while true; do ./theforgottenserver; done


Maybe its not locating theforgottenserver ?
 
So I added everything on cron, tested it closes the server but auto start doesn't start it

both in crontab:
Code:
36 6 * * * /sbin/shutdown -r now
@reboot /home/darth/restarter.sh

Inside of restarter.sh:
while true; do ./theforgottenserver; done


Maybe its not locating theforgottenserver ?

Yes, you can do the command:
pwd
to get the current path. Any shell script executed from cron should be absolute pathing.
So its likely something like this (based on pwd results in your OT folder):
while true; do /home/otsmanager/forgottenserver/theforgottenserver; done
 
Yes, you can do the command:
pwd
to get the current path. Any shell script executed from cron should be absolute pathing.
So its likely something like this (based on pwd results in your OT folder):
while true; do /home/otsmanager/forgottenserver/theforgottenserver; done

yea still doesnt work, it shuts it down perfectly but it doesnt turn it back on.
 
Restarter works but how to make that players are unable to login after x minutes time when server is online upon restart/global save? I would like to have server closed for x minutes after server is restarted upon global save
 
Back
Top