RebootOnNextMap

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

RebootOnNextMap

Post by Buggie » Tue Jan 18, 2022 11:54 am

RebootOnNextMap mutator

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 Tue May 17, 2022 12:57 am, edited 1 time in total.

User avatar
Barbie
Godlike
Posts: 2317
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie » Tue Jan 18, 2022 11:09 pm

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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Barbie
Godlike
Posts: 2317
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie » Thu May 12, 2022 11:27 pm

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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Eternity
Experienced
Posts: 88
Joined: Sat Nov 30, 2019 10:56 pm

Re: RebootOnNextMap

Post by Eternity » Fri May 13, 2022 12:24 am

Why "debug gpf" and not "exit"?

Buggie
Godlike
Posts: 1313
Joined: Sat Mar 21, 2020 5:32 am

Re: RebootOnNextMap

Post by Buggie » Fri May 13, 2022 4:13 am

Because "exit" save ini files. So pending changes in ini files will be destroyed.

User avatar
sektor2111
Godlike
Posts: 5810
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: RebootOnNextMap

Post by sektor2111 » Sat May 14, 2022 9:04 am

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: 2317
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie » Sat May 14, 2022 9:11 am

Is it worth to make it configurable?

Code: Select all

var config string TerminateCommand;
…
	ConsoleCommand(TerminateCommand);
…
DefaultProperties {
	TerminateCommand="debug gpf"
	// TerminateCommand="exit"
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 5810
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: RebootOnNextMap

Post by sektor2111 » Sat May 14, 2022 9:13 am

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: 2317
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: RebootOnNextMap

Post by Barbie » Sat May 14, 2022 10:42 am

sektor2111 wrote:
Sat May 14, 2022 9:13 am
Yes ?
Here you are. :mrgreen:
RebootOnNextMap.txt
Show
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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1313
Joined: Sat Mar 21, 2020 5:32 am

Re: RebootOnNextMap

Post by Buggie » Tue May 17, 2022 1:00 am

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