diff --git a/entrypoint.sh b/entrypoint.sh index 8c824c4..b347acb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,15 @@ # lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ftp:ssl-force $INPUT_FORCESSL; set ssl:verify-certificate false; mirror --reverse --continue --dereference --verbose=3 -P -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit" -# switch directory instead of using ncftp "local_dir" parameter -# this way, the local_dir is not created too. -cd "$INPUT_LOCALDIR" || exit 2; -ncftpput -R -z -m -u "$INPUT_USER" -p "$INPUT_PASSWORD" "$INPUT_HOST" "$INPUT_REMOTEDIR" "." +lftp -e " + set net:timeout 5; + set net:max-retries 3; + set net:reconnect-interval-multiplier 1; + set net:reconnect-interval-base 5; + set ftp:ssl-force $INPUT_FORCESSL; + set ssl:verify-certificate $INPUT_FORCESSL; + open $INPUT_HOST + user $INPUT_USER $INPUT_PASSWORD + mirror -v -P 5 -R $INPUT_LOCALDIR $INPUT_REMOTEDIR; + quit +"