Forums

Discussions of the easy to use open source game control panel.

You are not logged in.

Announcement

Welcome on board ! We are very proud to present you our forums powered by FluxBB ! Please Register, do not forget to read carefully Forum Rules and feel free to Contact Us if you see any problems. Finally, take part in site life !

#1 2014-09-05 08:03:52

GigaToni
Member
Registered: 2014-09-05
Posts: 5

Proper Server Configs

So because I hate the WebFTP and don't want to allow access to the configs and stuff I wrote my own little config management system:

v6mP17E.png
jNDWnV0.png
rQu69c3.png
pfmnaMk.png

While I still develop it I can't share it because everytime I update something it would be hard to upload it again so stay tuned! Because when it's done I will post it!

Mainly it uses call_user_func to determine which parser to use. For example the mta manifest.xml:

<configs>
            <file autocreate="false" parser="mta_xml">mods/deathmatch/mtaserver.conf</file>
            <file autocreate="false" parser="mta_acl_xml">mods/deathmatch/acl.xml</file>
        </configs>

And this is the mta_xml parser:
http://pastebin.com/MEZ3THRq
And java_properties parser (minecraft):
http://pastebin.com/Ngc1xXTq

Currently supported by this method is minecraft and mta. But I'll add support for more games when time passes smile

Check also my previous attempt for minecraft (+ added bukget to add mc plugins):
http://support.bgpanel.net/task/51

btw:
don't mind the missing WebFTP Tab. Disabled that shit. + Added a config option to disable it.

Last edited by GigaToni (2014-09-05 08:49:26)

Offline

#2 2014-09-05 08:49:40

GigaToni
Member
Registered: 2014-09-05
Posts: 5

Re: Proper Server Configs

8TpihvX.png

Finished SAMP just now smile!

btw:

with a couple of edits of the gameinstaller.php you can easily integrate steamcmd:

in switch($url['scheme']) add this:

[== Undefined ==]
case 'steam':
										$user = "";
										$pass = "";
										$queryParts .= '/home/bgp/steamcmd/steamcmd.sh +login '.$user.' '.$pass.' +force_install_dir '.$this->repoPath.' +app_update '.$url['host'].' validate +quit > '.$this->repoPath.'debug.txt;';
									break;

And add your credentials & smile boom it's updating your game.

My manifest.xml for TF:

<?xml version="1.0" encoding="utf-8"?>

<!--
TF 2
By gigatoni
Last Update: 09/06/2014
-->

<!-- Game Manifest -->
<game>
    <name>tf</name>

    <actions>
        <!-- Make Game Repository -->
        <repository>
            <get>steam://440</get>
        </repository>

        <!-- Install Game Server From Game Repository -->
        <installgame>
            <chmodx>hl2_linux</chmodx>
        </installgame>

        <!-- Update Game Server From Game Repository -->
        <updategame>
            <chmodx>hl2_linux</chmodx>
        </updategame>
    </actions>
</game>

(You'll need a spare steam account or disable steam guard on your main. steamguard MUST BE DISABLED. In my tests my account with steamguard kept getting stucked because everytime I run the update is asked me for the steamguard Key.)

Last edited by GigaToni (2014-09-06 03:02:54)

Offline

#3 2014-09-08 07:06:22

super_g2
Idea's master ;)
Registered: 2013-05-29
Posts: 116
Website

Re: Proper Server Configs

Or juste use Anonymous steam connection (officially supported, see their wiki smile)

Offline

#4 2014-09-11 08:22:25

GigaToni
Member
Registered: 2014-09-05
Posts: 5

Re: Proper Server Configs

Anonymous steam connection doesn't work on all games.

1. CSGO -> needs subscription
2. Arma 3 -> needs subscription
and many many more hmm.

Offline

#5 2014-09-11 11:51:36

super_g2
Idea's master ;)
Registered: 2013-05-29
Posts: 116
Website

Re: Proper Server Configs

CSGO : "login anonymous" works like a charm with steamCMD !
Arma3 : don't know.

Anyway, good work, PM Warhawk to discuss how to try the both worlds in only one system smile

Offline

#6 2014-09-11 17:09:48

Soldat Ryan
Member
Registered: 2013-06-02
Posts: 19

Re: Proper Server Configs

I confirm about Arma3.
You need a Steam Account but no need to be owner of the game to load server files.

Offline

#7 2014-09-12 12:32:06

GigaToni
Member
Registered: 2014-09-05
Posts: 5

Re: Proper Server Configs

I would recommend adding to the config page a dropdown to select which method to use:

proftpd (FTP-Server)
config-system (My system)
WebFTP (Ajxp)

would be the best for everyone

For proftpd-basic config: (Add this to the end of the file before Include):

DefaultRoot ~
AuthOrder mod_auth_file.c  mod_auth_unix.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthPAM off
RequireValidShell off 

<Directory /home/vagrant/gameservers/*>
    HideFiles "(\\.conf|\\.cacheinfo|\\.cfg|passwd|samp03svr|samp-npc|mta-server|acl.xml|core.so|net.so|xmll.so|deathmatch.so|dbconmy.so)$"
</Directory>

(Obviously the path must be changed.)
And then I've added to the PHP Files:

[== PHP ==]
$ssh->exec("cd /etc/proftpd/ && echo \"".$passwd."\" | ftpasswd --stdin --passwd --name ".str_replace(" ", "_", mysql_real_escape_string($name))." --uid 33 --home ".dirname($realGameServerPath)." --shell /bin/false");

to create the "virtual" FTP User. Then you'll need to save the pw either to the db or directly send the user a message smile!

Last edited by GigaToni (2014-09-12 12:51:24)

Offline

Board footer

Powered by FluxBB