Automatically moving HLTV demos to webspace

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
Hampster
New to forums
New to forums
Posts: 6
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Jul 11, 2012 10:34 pm

Automatically moving HLTV demos to webspace

Post by Hampster »

Hi everyone!

I'm currently setting up my HLTV and webspace to talk to each other.

I followed this thread on Allied Mods to set up a cronjob to query my server and auto record an HLTV demo only if 4+ people are on the server.

Where I'm stuck now is actually moving over the files. I started another script for another cronjob to be run once a day (in the morning) to pull completed HLTV demos over to the webserver and delete the demos on the HLTV server.

Code: Select all

cd /usr/www/user/public/demos/
wget ftp://hltvuser:hltvpass@user.hltv.nfoservers.com/tfc/*.dem -N

ftp -n -i user.hltv.nfoservers.com  << EOF
user hltvuser hltvpass
mdelete tfc/*.dem
quit
EOF
The wget part works just fine and the FTP logs in, but the FTP hangs on deleting and quits. I actually can't even ls or dir without it hanging. Using delete instead gives me a 550 Access denied message.

Any ideas? I was sent here by TimeX..
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Automatically moving HLTV demos to webspace

Post by Edge100x »

I don't believe that the standard FTP command-line application uses passive mode, so a different application may be needed which does.
Hampster
New to forums
New to forums
Posts: 6
Joined: Wed Jul 11, 2012 10:34 pm

Re: Automatically moving HLTV demos to webspace

Post by Hampster »

Can you suggest one I can use?
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Automatically moving HLTV demos to webspace

Post by Edge100x »

It looks like the default ftp client may actually support this itself. Try using the "-p" command-line option.
Hampster
New to forums
New to forums
Posts: 6
Joined: Wed Jul 11, 2012 10:34 pm

Re: Automatically moving HLTV demos to webspace

Post by Hampster »

Ah, that works perfectly. Thank you! :)
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Automatically moving HLTV demos to webspace

Post by Edge100x »

Awesome :)
arrow
New to forums
New to forums
Posts: 2
Joined: Tue Oct 02, 2012 8:24 pm

Re: Automatically moving HLTV demos to webspace

Post by arrow »

Hi.

I am currently running a VDS from NFO.

I am trying to do the same thing as Hampster. However I am stuck on the first installation which is found here.
http://forums.alliedmods.net/showthread ... ost1685431

I actually have everything installed. However I can not get it to connect to the server. I end up getting this error:

I tried updating the SourceQuery.class.php from paw's site as well. I have triple checked the server ip and port and rcon pw everything is right.

Server1 - IP:27015 - id 2
Server1 should be monitored
Could not connect to IP:27015
-----------------------------
Server2 - IP:27015 - id 3
Server2 should be monitored
Could not connect to IP:27015
-----------------------------

Does NFO block the incoming request? I have also checked the firewalls tab for the virtual server and the individual server and they are both empty/clear
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Automatically moving HLTV demos to webspace

Post by Edge100x »

You appear to be doing something a bit different than the OP was. I'm not familiar with the script you're applying, but from that error message, you may need to enter a numerical IP instead of "IP", or to connect to port 27020 (which is the actual HLTV port; 27015 is for the game server).
arrow
New to forums
New to forums
Posts: 2
Joined: Tue Oct 02, 2012 8:24 pm

Re: Automatically moving HLTV demos to webspace

Post by arrow »

I have the actual IP their, I just edited out. It has a place for both hlds and hltv IP's and their ports.
Hampster
New to forums
New to forums
Posts: 6
Joined: Wed Jul 11, 2012 10:34 pm

Re: Automatically moving HLTV demos to webspace

Post by Hampster »

You should probably uncomment the debugging lines in lib/db.php to give us more information about what's going wrong. If your HLTV has a password on it, the entry in the DB has to have that too.
Post Reply