splewis / csgo-pug-setup

CS:GO Sourcemod plugin for setting up private pug/10man games
GNU General Public License v3.0
412 stars 90 forks source link

Automatically upload gotv demo files #239

Open crashzk opened 6 years ago

crashzk commented 6 years ago

I think it would be perfect if you put the option to upload the demos to the internet, just like WarMod:

Configuration of Demos Upload in WarMod:

// FTP Upload stuff
wm_autodemoupload_enable "1", "Automatically upload demos when finished recording."
wm_autodemoupload_bzip2 "9", "Compression level. If set > 0 demos will be compressed before uploading. (Requires bzip2 extension.)"
wm_autodemoupload_delete "0", "Delete the demo (and the bz2) if upload was successful."
wm_autodemoupload_ftptargetdemo "demos", "The ftp target to use for uploads."
wm_autodemoupload_ftptargetlog "logs", "The ftp target to use for uploads."
wm_autodemoupload_completed "1", "Only upload demos when match is completed."
nameproof commented 5 years ago

While this isn't implemented, I made a quick bash script to do this if anyone's interested, atleast for linux.

inotify.sh

#!/bin/sh
while true
do
      inotifywait -e close_write --exclude=".txt" /path/to/csgo && sleep 1m && /path/to/sftp.sh
done

sftp.sh

#!/bin/bash
sftp username@host << DELIMITER
cd path/to/uploaddir
put /path/to/csgo/*.dem
quit
DELIMITER
rm -rf /path/to/csgo/*.dem

Make the script run on boot by adding to /etc/rc.local nohup ./path/to/inotify.sh >/dev/null 2>&1 &

Requirements: inotify-tools, sftp server, and SSH public-key authentication setup.

MoritzLoewenstein commented 4 years ago

since most csgo server providers dont allow full access to bash scripts, you can use this. This is basically tEasyFtp and tAutoDemoUpload by "Thrawn" with some slight adjustments/fixes (original version dead).

crashzk commented 4 years ago

since most csgo server providers dont allow full access to bash scripts, you can use this. This is basically tEasyFtp and tAutoDemoUpload by "Thrawn" with some slight adjustments/fixes (original version dead).

Your version uses this as a base, correct?

https://github.com/thraaawn/tEasyFTP

Your sends to FastDL automatically the demos, would that be?

MoritzLoewenstein commented 4 years ago

Yes, this and this, as you can see both are not longer supported and didnt compile when I downloaded them. My version compiles fine and works the same, you have to enter fastdl data in addons/sourcemod/configs/RemoteTargets.cfg. I will add a ReadMe.

WardPearce commented 4 years ago

Might be worth checking out https://github.com/WardPearce/SQLMatches