Lingon lftp script help

xtobyx
New Contributor

Hi Guys,

trying to run a script for syncing files with lftp at midnight everyday.
got the script to work

now trying to use lingon to do the scheduling process.

the script works fine in terminal but i got error message in lingon...

any clue?
thanks a lot,
Toby

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin</string> </dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>com.leafletsync.services</string> <key>LaunchOnlyOnce</key> <false/> <key>LimitLoadToSessionType</key> <array> <string>LoginWindow</string> </array> <key>ProgramArguments</key> <array> <string>/Users/xtobyx/Desktop/VP_sync</string> </array> <key>RunAtLoad</key> <true/> <key>StartOnMount</key> <true/>
</dict>
</plist>
7f760ca7488241f3b9c486e1d2814d92

2 REPLIES 2

mm2270
Legendary Contributor III

What is lftp? I haven't heard of that utility. It appears like its something not native to the OS. Are you sure the binary/tool exists on the Mac you're running the job on? The error lftp: command not found typically happens when it wasn't able to locate the utility to run.

If it is installed, then maybe your actual script being called by the launchd job needs to have the full path to where it is installed on the system. You didn't post the script itself, so I'm only taking a guess on that.

Eigger
Contributor III

lftp is a powerful file transfer tool, better than rsync as you can do mirror, segmented, and parallel download/upload and many other awesome stuff. This is what I use to replicate packages as we do not use JDS (We have a very slow internet here in the Northernmost City in the US!). Yes, its not native in OS X, you need homebrew to install it. And if youre on Sierra, Please note that lftp has been moved to the boneyard. You need to do "brew install homebrew/boneyard/lftp" to install it. Install ssh-copy-id also from Homebrew so you dont need to enter password everytime. I use this command to download packages from my Master Distribution Point.

lftp -u casperrw,pass -e "set sftp:connect-program 'ssh -a -x -T'; mirror -v -c --delete --loop --use-pget-n=10 -P 2  /Volumes/ServerHD2/CasperAFPShare/Packages /Volumes/Server HD/CasperAFPShare/Packages ; quit" sftp://ipaddress:22

[http://lftp.tech/lftp-man.html](link URL)

[http://manpages.ubuntu.com/manpages/xenial/man1/ssh-copy-id.1.html](link URL)