RebootOnNextMap

Search, find and discuss about Mutators!
Buggie
Godlike
Posts: 3169
Joined: Sat Mar 21, 2020 5:32 am

RebootOnNextMap

Post by Buggie »

Admin can make reboot server on next map start. Map will be restored after reboot.

Install:
Add to mutator list RebootOnNextMap.RebootOnNextMap (or to ServerActors - preferred way)

Usage:
login as admin (nexgen login supported too), call mutate command:
mutate RebootOnNextMap

Settings:
you can change TerminateCommand in RebootOnNextMap.ini.
Well-know commands is:

debug gpf
exit

(for use "exit" command you need very specific setup of server [read-only ini files], since on exit server save INI files with overwrite any changes in it)
RebootOnNextMap.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Buggie on Sat Jun 18, 2022 5:29 pm, edited 3 times in total.
User avatar
Barbie
Godlike
Posts: 2925
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie »

It should be mentioned that this mutator only aborts the UT server. The restart of the UT server must be done "from outside", e.g. from a loop in a batch file.
"If Origin not in center it be not in center." --Buggie
User avatar
Barbie
Godlike
Posts: 2925
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie »

A small modification for version 2: white spaces around the argument for MUTATE are removed
You do not have the required permissions to view the files attached to this post.
"If Origin not in center it be not in center." --Buggie
Eternity
Skilled
Posts: 178
Joined: Sat Nov 30, 2019 10:56 pm

Re: RebootOnNextMap

Post by Eternity »

Why "debug gpf" and not "exit"?
Buggie
Godlike
Posts: 3169
Joined: Sat Mar 21, 2020 5:32 am

Re: RebootOnNextMap

Post by Buggie »

Because "exit" save ini files. So pending changes in ini files will be destroyed.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: RebootOnNextMap

Post by sektor2111 »

Different options - my two cents:
ServerReset scheduler tool which I have modified uses "EXIT". Does this do issues with INI file ? Never !
Why ? Because server uses "-readini" parameter. Low skilled affiliated "Admins" won't damage anything from "inside". Mainly ini files which are important are set Read-Only. This way in operating a server does ZERO headaches keeping server in original state. Changes are operated using auto-update methods executed BEFORE re-starting the server after a crash or a scheduled shut-down. Here is also doable a forced restoration of settings and stuff for map-votes and other various tasks needed for recovering original "known-good" configuration.
Last edited by sektor2111 on Sat May 14, 2022 9:15 am, edited 2 times in total.
User avatar
Barbie
Godlike
Posts: 2925
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie »

Is it worth to make it configurable?

Code: Select all

var config string TerminateCommand;
…
	ConsoleCommand(TerminateCommand);
…
DefaultProperties {
	TerminateCommand="debug gpf"
	// TerminateCommand="exit"
}
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: RebootOnNextMap

Post by sektor2111 »

Yes ?
Edit:
Perhaps a "mix" with ServerReset in order to gain something more advanced:
- Server will reset at desired time IF game is not running or... when are no players inside;
- If server has players, it will get a reboot after ending game.
So far this is prototype is only in my mind - perhaps I'll do it or maybe is not a real need... :noidea .
Last edited by sektor2111 on Sat May 14, 2022 6:25 pm, edited 2 times in total.
User avatar
Barbie
Godlike
Posts: 2925
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie »

sektor2111 wrote: Sat May 14, 2022 9:13 amYes ?
Here you are. :mrgreen:
RebootOnNextMap.txt
RebootOnNextMap mutator

Admin can make reboot server on next map start. Map will be restored after reboot.

Install:
Add to mutator list RebootOnNextMapV3.RebootOnNextMap (or to ServerActors - preferred way)

Usage:
login as admin, call mutate command:
mutate RebootOnNextMap

---8<---
Changelist for version 2 (13 May 2022):
* white spaces around the argument for MUTATE are removed

Changelist for version 3 (14 May 2022):
* the console command to terminate the UT server is configurable via INI file
You do not have the required permissions to view the files attached to this post.
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3169
Joined: Sat Mar 21, 2020 5:32 am

Re: RebootOnNextMap

Post by Buggie »

Some changes:

- add trim for check incoming command.
- make terminate command configurable.
- add support nexgen logins. Checked serverAdminRight privilege.

Updated in first post: viewtopic.php?f=7&t=14997
Buggie
Godlike
Posts: 3169
Joined: Sat Mar 21, 2020 5:32 am

Re: RebootOnNextMap

Post by Buggie »

- fix detect user rights in nexgen.

Updated in first post: viewtopic.php?f=7&t=14997