Server's Console RestarterSolved

This is a .bat script designed to relaunch your server's main console if it experiences a critical error resulting in a crash, the file must be in the main directory of your rust servers folder to work correctly, you can then create a shortcut of this file and place it on your desktop for ease of use.

@echo off
:start
@echo.
@echo Launching Server
start /wait /min YourFileNameHere.bat //Change this to match the name of the the file that launches your server
@echo.
@echo Server Offline
@echo.
@echo Time Of Crash
@echo %time%
@echo.
@echo Server Rebooting...
GOTO start
hdljepcobpQqYu2.jpg Wulf

We provide examples for both Linux and Windows already viaΒ https://github.com/OxideMod/Oxide.Rust/tree/develop/resources

Also keep in mind thst the process ending does not mean it crashed.

im not super professional with scripting but this script provides an entirely different function. its a failsafe that will automatically restart the servers batch file if for any reason it closes unexpectadly. iv used it before many years ago to setup a fully autonomous server that would reboot at specific times and upon crashes would bring the server back up, the big difference between what you linked and what im providing is this script stays active in a totally other cmd window.

VGCVj3R4gmDI6Q3.jpg Judess69er

im not super professional with scripting but this script provides an entirely different function. its a failsafe that will automatically restart the servers batch file if for any reason it closes unexpectadly. iv used it before many years ago to setup a fully autonomous server that would reboot at specific times and upon crashes would bring the server back up, the big difference between what you linked and what im providing is this script stays active in a totally other cmd window.

The only benefit with the extra window is if someone physically closes the other window, otherwise they are the same.
imHWxdqgHlz8WrM.jpg Wulf
The only benefit with the extra window is if someone physically closes the other window, otherwise they are the same.

actually it detects if the window was physically closed by the user, if you click the X button the restarter will ask for Y/N input if you want to continue the process, if it unexpectadly closes or closes through the command line itself, that input prompt wont appear.

you can see what i mean my creating a simple test batch file named YourFileNameHere.bat with this code in it.

pause
exit

when you press any key on the test file it will close, the restarter will take a timestamp and relaunch the file but if you click the X button it hangs and waits for user input.



Merged post

also additionally you can grab by adding %date% infront of %time% if your server is running all the time and you wanna keep track of downtime incidents from the year down to the second of when it happened... honestly i should have included %date%%time% in there from the beginning but i wasn't thinking i guess

Merged post

also additionally you can grab the date**

Β 

man not having edit is really screwing with me πŸ˜…



Merged post

here i just simplified everything and made it into a drag and drop format. instructions are in the README.txt file Console Server Restarter

Merged post

also while i was looking around my old files i found a batch file i wrote to work as a master console for controlling the launch of multiple servers Server Selector you can launch a single server at a time or all of them in a single button press, idk maybe it will be useful for someone.

Merged post

as i just figured out its not the best idea to launch all your servers at the same time lol but it still makes a great console for controlling your servers all in 1 app if you run multiple.

I was mentioning that our example doesn't handle window closures, not your own. :P

pPFQGOGmftb1plM.jpg Wulf

I was mentioning that our example doesn't handle window closures, not your own. :P

lol yea iv actually messed around with the whole thing a bit more and then my OCD kicked in and i spend the last hour relinking all the paths to shortcuts so each window has a corrisponding rust icon and opens at a specific size in a specific location. looks real sleek now if i do say so myself πŸ˜…

Server Manager

UoOIspCCZ8RcW9y.jpg Wulf

I was mentioning that our example doesn't handle window closures, not your own. :P

wellp... i officially just went overboard.... i went and reworked the entire Server Manager.... its a fuckin work of art now... you honestly gotta check it out you'll shit your drawers....

Server Manager 2.0

Server Manager 2.1 Minor fix (Spelling Error)

Preview of manager script



Merged post

Server Manager 2.2Β Major Fix (needed to correct file paths so they persisted when called from a different home directory)



Merged post

Server Manager 2.3Β Fixed some variables i missed, it should work 100% now.



Merged post

by the way i give you guys permission to use this script if you want to add it onto oxide as an additional download. its not like i designed it for any other thing lol, well the original program was designed for a different game but it used the same general layout as rust servers so it will works none the less, im sure with a little tweaking you could make it run with different servers but unless im hosting them i probably won't make the changes to the script myself.

Merged post

just make sure to give me a little mention in the description/info if you do end up using it lol, xD i had to learn quite a bit about vbs and batch scripting overnight during the process of making it lol