How do I safely stop the Distributed Folding client via script, a command in a cron job, etc?
Deleting the “foldtrajlite.lock” file will halt the Distributed Folding client safely after it finishes the current structure (it will try to upload the results to the server if you are online, as well). While this seems counter-intuitive (deleting a file to stop the client safely) it DOES work. The “foldtrajlite.lock” file is created when the DF client is executed and deleted when the client is properly shut-down. The existence of the “foldtrajlite.lock” file indicates that the DF client is either a) operating properly or b) was closed down improperly. Including a command to delete the “foldtrajlite.lock” file with whatever commands or scripts that you use to launch the DF client is a safe and reliable way to make sure that the client properly starts, even if it was shut down improperly.