Running Action Scripts
The servedat server may be configured to run scripts or commands in response to certain client requests. The mechanism for this is identical to Getting Packages. The only difference is in how you use them. Packaging commands are intended to download and save an archive file. Action Scripts are intended to perform a specific function and report the result.
To execute an action script, you must select a file which exists and is accessible. Then append an equal-sign and the action suffix corresponding to the action script you wish to run. For example:
movedat -D foo.bar.com:/path/file=dothat
This requests that the server run the "dothat" script on the target "/path/file". The -D option forces movedat to display the output of the script to stdout.
If you do not specify -D, then movedat may expect you to provide a file target where it will save the script output and append the action suffix to the name.
Alternatively, you may pipe the script output to another process for interpretation, or capture it in an environment variable. movedat's exit code only reports the success or failure of the network transaction. It does not report whether the script itself succeeded or failed. You must check the script output to determine its results.
Note that you cannot combine inline compression with Action Scripts: you may only use one or the other.