• 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 reboot script

hepy

New Member
Joined
Aug 15, 2007
Messages
217
Reaction score
1
Hi
i dont know if this the right forum is... but i need an auto reboot script for linux ubuntu.
The idea is that this script shutdown the server at 6am, make a pc reboot and then start the server again.
Any idea how to make this?
thanks!
 
First: No, This is not the right forum to make such request.
Second: Restart on Linux? What for? you must be trolling lmfao... Srsly, You don't need to restart a computer with Linux. Not even when there is a need of updating the Linux Kernel. 'nuff said
 
because after 150+hrs of server uptime it lags and it has more possibilities for crashing.. i dont want to disturb my players making server restart at 4pm for example and i dont want to wake up every day at 6am to reboot the pc
 
because after 150+hrs of server uptime it lags and it has more possibilities for crashing.. i dont want to disturb my players making server restart at 4pm for example and i dont want to wake up every day at 6am to reboot the pc

Lol 150 hours its like 6 days. You dont need to make reboot on the computer you can use Globalsave.
 
yes i know and you really dont understood anything about my request
 
A linux you dont need to reboot! If you dont believe me so test Globalsave!
 
right :) i will use this thanks! i didnt tough in this xd

global save is not working in my server idk why :(
and also.. if the server is shutted down by globalsave, it wont be started with the linux application "screen"
so i will need a script that shut down the server and then start it again, but with screen... any idea?

look, if i add this to my crontab,nothing happens at 10 pm :(, i need to open automatically the "up" file, to run my server with the linux screen application
0 22 * * * /home/valh/up

bump

bump
 
Last edited by a moderator:
I agree that rebooting most GNU\Linux distributions is superfluous/redundant(the bad kind). However TFS isn't a large open source project with many eyes looking at the code. Further more it's extensible leaving room for downstream bug introduction. Automated restarting for it is certainly understandable.

Do it yourself, but here is a tutorial for the tool made for such things.
Cronjobs Tutorial, Cronjobs reference, Crontab reference, Advanced cron @ LiveCronJobs.com
 
look, if i add this to my crontab,nothing happens at 10 pm :(, i need to open automatically the "up" file, to run my server with the linux screen application

I didn't notice that you said this. May I ask why you need it to be ran through /usr/bin/screen?

Is does your file ~/up have a proper shabang? is it executable by everyone? Does it assume nothing or (even better) assume that no proper env variables and only basic PATH are set?

globalevents. time="6:00" /> and put a shutdown script and it'll be executed at this time.

If you had casually read his later posts, this idea was already dismissed. It's not an answer as it ignores the original request: Restarting. I don't know what restart means in your part of Sweden, but in my part of America it means to stop and then start again.

Maybe you do drugs, and not the good kind like I do, so perhaps I'll put it in terms you can understand: He needs to relapse after treatment.
 
Last edited by a moderator:
add this line to crontab
Code:
30 16 * * * root reboot
after that reload it by
Code:
/etc/init.d/cron restart
30=Minutes
16=Hours
16:30 doesn't mean after 16 hour it mean 04:30 pm
you can also start the server again after 10 minutes by
Code:
40 16 * * * root cd /home/valh/ screen ./up
 
Last edited:
Back
Top