mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-01-19 17:34:43 +00:00
swap out wget for lftp
This commit is contained in:
parent
fbff090ba5
commit
0bbfa32ef6
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ RUN go build -o main .
|
|||
FROM golang:1.14-alpine
|
||||
LABEL maintainer="Anthony Mineo <anthonymineo@gmail.com>"
|
||||
|
||||
RUN apk update && apk add --no-cache wget tzdata
|
||||
RUN apk update && apk add --no-cache wget tzdata lftp
|
||||
|
||||
#Set TimeZone
|
||||
ENV TZ=America/New_York
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ services:
|
|||
constraints: [node.role == manager]
|
||||
|
||||
parser:
|
||||
image: "amineo/t2-stats-parser:v0.4.1"
|
||||
image: "amineo/t2-stats-parser:v0.5.0"
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./build/go-t2-stat-parser/Dockerfile
|
||||
|
|
|
|||
Loading…
Reference in a new issue