User Tag List

Results 1 to 1 of 1
  1. #1
    Administrator SAM's Avatar
    Join Date
    Jan 2011
    Posts
    8,278
    Country:

    How to setup Auto Import of UTStats for your UnrealTournament server

    When I tried to setup the UTStats trigger mod (which auto imports) I had some trouble and the shell script just wasn't executing. Don't know why so don't ask me!

    Anyhow, here is an alternative explanation how to implement this. No additional serverside or webserver modifications required. It simply uses the FTP feature already built into UTStats to upload to the webserver, and the webserver then just executes (via cron) the import script.

    1) Setup your UTStats FTP account. This needs to be for the script to access the gameserver.
    2) Setup the /includes/config.php to look something similar to this (config from the Instagib UK server):
    Code:
    //UT Server 1
    $i = 0;
    $ftp_hostname[$i]    = '185.16.85.10';                // FTP server location here
    $ftp_port[$i]         = FTPPORT;                // FTP Port - do not remove this even if you do not use ftp
                                                // Do not add '' around the port either
    $ftp_uname[$i]     = 'FTPUSER';                // FTP Username
    $ftp_upass[$i]     = 'FTPPASS';                // FTP Password
    $ftp_dir[$i][]     = '/185.16.85.10 port 7777/Logs';            // Directory of the log files - MUST NOT end with a /
    //$ftp_dir[$i][]     = '/';            // You may repeat this entry as often as you wish but please remember
    //$ftp_dir[$i][]     = '/';            // to enter the directory relative to the last one
    //$ftp_dir[$i][]     = '/';            // (or use an absolute path)
    $ftp_passive[$i]     = true;            // Use passive transfer mode for this connection?
    $ftp_delete[$i]     = true;             // Delete logs after download?
    3) Setup your cronjob

    Code:
    php -q -f /home/your_webdir_username/public_html/stats/import.php  var1=your_import_password
    (replace your_import_password with import password and replace your_webdir_username with your username)

    With the above config, your webserver *should* execute upload. However there may be limitations set by your host allowing a minimum interval of 15 minutes. In any case, it should still work as long as they don't have a daemon/process monitoring executions.

    You should also add *before the command line execution* when you would like it to execute

    CronJob explanation
    Basic crontab schedule consists of six field/variables:
    minute hour day month day-of-week command-line-to-execute

    If I wanted the cron to take place once an hour, I would use the following:

    0 * * * * php -q -f /home/your_webdir_username/public_html/stats/import.php var1=your_import_password

    If I wanted the cron to run at 8PM


    0 20 * * * php -q -f /home/your_webdir_username/public_html/stats/import.php var1=your_import_password

    And so on...
    Last edited by SAM; 11-08-2013 at 01:29 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Music import failed
    By Blackdeath in forum Technical Problems
    Replies: 4
    Last Post: 09-11-2015, 04:00 PM
  2. US IG server UTStats not updating?
    By seeya in forum zp| [====] [PURE] [INSTAGIB] [UK] [US] [====]
    Replies: 5
    Last Post: 12-21-2014, 09:01 AM
  3. Server Setup
    By BustaPrime in forum General Discussion
    Replies: 16
    Last Post: 07-04-2014, 03:57 PM
  4. *Auto Update UTStats*
    By Braka in forum zp| [====] [PURE] [INSTAGIB] [UK] [US] [====]
    Replies: 39
    Last Post: 01-16-2014, 08:26 PM
  5. Linux UnrealTournament
    By |uK|Sponge in forum Screenshots
    Replies: 9
    Last Post: 03-15-2011, 09:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •