[PHP] Nouse Web Tool Bundle V2.1

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 16 Oct 2009 19:06

I have some Questions ...

i got this constelation :

Shelluser for the dediserver and Xaseco 1.10
Webserver for my other stuff.
And i have not the Stuff from my dediserver in the Webserver.
So how can i use the Control (shutdown,start,restart) functions ?

Any Ideas ?
I got three Servers on this Mashine. :)

Hopefully you can help me.

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by nouseforname » 16 Oct 2009 19:22

well, there's no need to have all of that in the web folder. just define the correct path in servers.xml

Code: Select all

	<!-- path to shell start/stop/restart scripts, only neccessary if you use Control tool -->
	<shellpath>/home/tmf/</shellpath> 
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 17 Oct 2009 18:32

Well,
i will try this out.
Thx for Answering-

I will report my results.:)

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 27 Oct 2009 11:44

Hi there,
i use now the 2.0 Version of your Nice Toolbox :)

But one Thing doesnt work correctly :

When i use the Statuscheck with dedi1 status the script restart the server. But the Server works .

In the Status page, i can stop, start and restart all Servers very fine. But on the Shell , the status doesnt work.

Any ideas ? All Settings are correct and all other functions OK.
And under Debian 5 , sudo is not the best way :) so i comment this out and starts the script without it.

Thanks for this nice Toolbox. It makes Gamesserver Hosting much easier.

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by nouseforname » 27 Oct 2009 11:56

chatty wrote: When i use the Statuscheck with dedi1 status the script restart the server. But the Server works .
Any ideas ? All Settings are correct and all other functions OK.
And under Debian 5 , sudo is not the best way :) so i comment this out and starts the script without it.
the status check is done by checking if the pidfile exist, pidfile (eg. SAMPLEdedi.pid) includes the PID of the running process. if the pidfile don't exist there will be no restart, if the pidfile exist, the script check for any process with this PID, if no PID found, it will restart. i never had problems with this, but you should check if the pidfile includes the correct PID after starting a server.

Why SUDO is not the best? could you try to explain and tell me whats better? and how did you do it now? let me see thc code pls.
i still use Debian4^^ tried upgrading but fails due to some apllication i use.^^
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 28 Oct 2009 07:38

nouseforname wrote:the status check is done by checking if the pidfile exist, pidfile (eg. SAMPLEdedi.pid) includes the PID of the running process. if the pidfile don't exist there will be no restart, if the pidfile exist, the script check for any process with this PID, if no PID found, it will restart. i never had problems with this, but you should check if the pidfile includes the correct PID after starting a server.

Well the Pidfiles of the dediservers, are in the right path. An the processid must be right, cause the stop syntax works fine.
Well, i think the Problem is, that on my Server runs 5 Server. All the Serverfiles have the same name eg. : TrackmaniaServer
I think thats the Problem.
In some Pidfiles there are 3 Processids or more. I cant understand this :)
nouseforname wrote: Why SUDO is not the best? could you try to explain and tell me whats better? and how did you do it now? let me see thc code pls.
i still use Debian4^^ tried upgrading but fails due to some apllication i use.^^

i will try to explain . The Sudo command works not under the www-data user. I have place the User in /etc/sudoers file, but it doesnt work. No rights to write pidfiles. cause every web runs under special Usernames.
like : webuser1 with group webusergroup1 (as example). so www-data has no rights on this files.
The curios Thing is, the script startups (when you click a command) with www-data not with webuser1.webusergroup1


in the file with the command for start / stop / restart comment the sudo out. the rest of your code is the same. i write the exact code here, when i back home.

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by nouseforname » 28 Oct 2009 07:52

each single pidfile should have another name, which means you'll have to rename the executing files, which makes it also easier to recognize them in list. after renaming each pid file includes only one PID and all should work fine.

regarding the SUDO, i put the web user into same group as server user, than modded the SUDOERS file to the correct rights.
web user can execute the shellfiles in the server folder.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 28 Oct 2009 08:29

nouseforname wrote:each single pidfile should have another name, which means you'll have to rename the executing files, which makes it also easier to recognize them in list. after renaming each pid file includes only one PID and all should work fine.

regarding the SUDO, i put the web user into same group as server user, than modded the SUDOERS file to the correct rights.
web user can execute the shellfiles in the server folder.
AHHHHH. well i think, that where the wrong way. and on this hand , i didnt rename the Files. Ok, than i was right . Thank you. I will rename the TrackmaniaServer into right names of my Dedicated Server Path.
One Server Name is dirt so will_rename the File in TrackmaniaServer_Dirt
Is that the right way ? An in one of the Configfile i will rename it too.
Ah, one Problem i found :
In the Pruning Tool , you can choose the Servers, and the Tracklistpath and File. the Path is to short :) it shorten the Name tracklist.txt . So it ends at /path/bla/blub/foo/bar/Matchettings
the Tracklist File is away :) not long enough:)

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by nouseforname » 28 Oct 2009 09:09

chatty wrote: One Server Name is dirt so will_rename the File in TrackmaniaServer_Dirt
Is that the right way ? An in one of the Configfile i will rename it too.
Yes, thats it.
chatty wrote: Ah, one Problem i found :
In the Pruning Tool , you can choose the Servers, and the Tracklistpath and File. the Path is to short :) it shorten the Name tracklist.txt . So it ends at /path/bla/blub/foo/bar/Matchettings
the Tracklist File is away :) not long enough:)
your path must be very long :)

in tools/Prunetracks/index.php ~line 70:

Code: Select all

	<td colspan="2"><input type="text" size="100" name=file value="'; 
	if (isset($_POST['file'])) { echo ($_POST['file']);} else {echo''.$path.'';}
	echo'"  maxlength="100" ></td></tr>
	<tr class="color2">
change maxlenght to 300:

Code: Select all

 maxlength="300"
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 28 Oct 2009 10:14

Thank You Sir :)
i will make the changes asap.

Yes my path is very long :) from the shell i can use Symlinks, but in Apache...:)


Great Support.

Have a nice day , and keep this projekt.

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 18 Nov 2009 07:37

Hi there,
now all works very well.

But the Status Check makes me crazy. The Dediserver is now started with www-data .
The Check is made over cron and as User www-data.

But all what it does : it restarts all. Dediserver and xaseco.
I dont know why. The Pid file is there with on Tasknumber. stop / restart and all other works. Not the Statuscheck.

Any Ideas ?

chatty
cyclist
cyclist
Posts: 31
Joined: 10 Aug 2008 08:11
Owned TM-games: TMU,TMS,TMF
Location: Germany / Berlin
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by chatty » 25 Nov 2009 06:43

Now all works very fine. statuscheck Runs !!!
I don't know why, but i think it is the UID and GUID.
The web works as web4711.web4 (as an Example)
The Servers where started with : www-data.www-data .
The Cron is working with web4711.web4.
So i change the cronjob to run as www-data.www-data and now it works just fine. :thumbsup:



And now here my question from a Admin of a rented server :
Is it possible to controle other Servertools as Xaseco ? Like Fast or something ?
A changing of the Directories and Scriptfolder to fast, bring it not on the Line.

Does it work or not ?

Greetings
Chatty

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by nouseforname » 25 Nov 2009 07:34

chatty wrote: And now here my question from a Admin of a rented server :
Is it possible to controle other Servertools as Xaseco ? Like Fast or something ?
A changing of the Directories and Scriptfolder to fast, bring it not on the Line.

Does it work or not ?

Greetings
Chatty
due to this is a normal linux shell script, it should be possible to control other processes too.
you'd need to modifiy the shells to your needs. and it should work already.

regarding the status display page.... the page is made to display dedi and xaseco, the script is searching a log for the word xaseco.
if you dont change the log output of the shells it should work too. well, itÄS written xaseco instead of "fast" or else.

you would have to change that script to.

due to i dont use fast, it's not supported by me. :)
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Greco
happy cruiser
happy cruiser
Posts: 144
Joined: 13 May 2009 18:40
Owned TM-games: TMN

Re: [PHP] Nouse Web Tool Bundle V2.0

Post by Greco » 25 Dec 2009 09:26

good work man. I will try it now.

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [PHP] Nouse Web Tool Bundle V2.1

Post by nouseforname » 30 Dec 2010 12:31

updated the shell scripts, see first post
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Post Reply