Trackmania Updates for ManiaControl, Release v0.220

ManiaControl, the completely new designed and easy to use controller managing all your Maniaplanet server.

Moderators: Jocy, Wabbitface, steeffeen, NADEO

chapelier
Posts: 69
Joined: 08 Sep 2014, 16:43

Re: Trackmania Updates for ManiaControl, Release v0.220

Post by chapelier »

hey,
Question surely posed full of times but I have not found the answer :
- Is it possible to setup ManiaControl to support multitple Dedicated servers on a single machine ?
chapelier
Posts: 69
Joined: 08 Sep 2014, 16:43

Re: Trackmania Updates for ManiaControl, Release v0.220

Post by chapelier »

kremsy wrote: 06 Jun 2017, 11:53

Code: Select all

	<server id="server1">
		<!-- MC Dev Elite -->
		<host>ip1</host>
		<port>5001</port>
		<login>SuperAdmin</login>
		<pass>YOUR_PASS</pass>
	</server>
	
	<server id="server2">
		<host>ip2</host>
		<port>5001</port>
		<login>SuperAdmin</login>
		<pass>YOUR_PASS</pass>
	</server>
while the id corresponds to the id in the sh file.
I feel confused, for me ip1 et ip2 are the sames and i have 2 differents ports like 5001 and 5002.
But anyway it doesnt worked... did i missed something ?
chapelier
Posts: 69
Joined: 08 Sep 2014, 16:43

Re: Trackmania Updates for ManiaControl, Release v0.220

Post by chapelier »

The 2 maniaControl instances send their commands to the same server, the first in the server.xml file.
for instance, when i switch the servers in that file, then it is the first which works and the commands are send 2 times.
chapelier
Posts: 69
Joined: 08 Sep 2014, 16:43

Re: Trackmania Updates for ManiaControl, Release v0.220

Post by chapelier »

here it is :
ManiaControlLagoon.sh

Code: Select all

#!/bin/sh
php ManiaControl.php -id serverLagoon -sh ManiaControlLagoon.sh >ManiaControl.log 2>&1 &
echo $! > ManiaControl.pid
ManiaControlTrial.sh

Code: Select all

#!/bin/sh
php ManiaControl.php -id serverTrial -sh ManiaControlTrial.sh >ManiaControl.log 2>&1 &
echo $! > ManiaControl.pid
and the server.xml

Code: Select all

         <server id="serverLagoon">
		<host>127.0.0.1</host>
		<port>5002</port>
		<user>SuperAdmin</user>
		<pass>xxxx</pass>
	</server>
	
	<server id="serverTrial">
  	        <host>127.0.0.1</host>
		<port>5000</port>
		<user>SuperAdmin</user>
		<pass>xxxx</pass>
	</server>
chapelier
Posts: 69
Joined: 08 Sep 2014, 16:43

Re: Trackmania Updates for ManiaControl, Release v0.220

Post by chapelier »

I think the problem is here :

Code: Select all

public static function getParameter($paramName) {
		$paramName = (string) $paramName;
		$params    = self::getAllParameters();
		foreach ($params as $param) {
			$parts = explode('=', $param, 2);
We need to use "=" for the parameters.

And we need to use "-config=server1.xml" in the command line.

Code: Select all

private function loadConfig() {
		$configId       = CommandLineHelper::getParameter('-config');
		$configFileName = ($configId ? $configId : 'server.xml');
so we need to have 2 xml files.

and now it works !

edit : and having 2 xml files, we can have 2 distinct databases for each server.
Post Reply

Return to “ManiaControl”

Who is online

Users browsing this forum: No registered users and 2 guests