I'm trying to automate LFTP activity from a Python script. I'm would like to achieve a behaviour whereby if there is a background LFTP process then attach to it and append to its existing queue. I'm invoking LFTP with -f and feeding it a string of commands generated from my Python script.
I'm using LFTP version 4.6.0 If I attach to an existing process and queue files: attach 1234 queue get "ubuntu-16.04.3-desktop-amd64.iso" bye I receive a not connected error and the file isn't queued If I attach to an existing process, open a connection and queue files: attach 1234 open sftp://releases.ubuntu.com/ -u ubuntu,ubuntu queue get "ubuntu-16.04.3-desktop-amd64.iso" bye It creates another process. The output resembles this: [1234] Attached to terminal. [1234] Detaching from the terminal to complete transfers... [5678] Moving to background to complete transfers... Is there a way to achieve the desired behaviour, i.e. maximum of one LFTP process running? Thanks.
_______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp