mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-03-09 14:40:28 +00:00
swap out wget for lftp
This commit is contained in:
parent
fbff090ba5
commit
0bbfa32ef6
3 changed files with 8 additions and 3 deletions
|
|
@ -31,7 +31,12 @@ func initFTP() {
|
|||
|
||||
fmt.Println("Downloading stat files from", ftpHOST + ftpPath)
|
||||
|
||||
cmd := "wget --recursive --no-passive-ftp -nH --cut-dirs=4 --ftp-user=" + ftpUSER + " --no-parent --ftp-password="+ ftpPW +" -P /app/serverStats/stats/ ftp://" + ftpHOST + ftpPath
|
||||
// wget is a bit buggy with FTP in v1.20.x
|
||||
// cmd := "wget --recursive --no-passive-ftp -nH --cut-dirs=4 --ftp-user=" + ftpUSER + " --no-parent --ftp-password="+ ftpPW +" -P /app/serverStats/stats/ ftp://" + ftpHOST + ftpPath
|
||||
|
||||
cmd := "lftp -c 'open "+ftpHOST+"; user "+ftpUSER+" "+ftpPW+"; mirror -e "+ftpPath+" /app/serverStats/stats/; quit'"
|
||||
|
||||
|
||||
|
||||
err, out, errout := Shellout(cmd)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue