Pre/Post Script Examples
The following pre-processing and post-processing script examples demonstrate how Aspera prepost environment variables are used to achieve different types of processing.
Note: The "File Pre- and Post-Processing (Prepost)" feature will be deprecated from HST Server
and HST Endpoint in versions 4.0 and onward. At that time, customers should use Inline File
validation with Lua (Inline File Validation with Lua Script) or an External URL validator
(Out-of-Transfer File Validation) for pre-post processing features.
These examples use bash syntax. To run these examples on your own system, do the following:
- Save the example to /opt/aspera/var/myscript.sh.
- Ensure that the script file is executable -- for example:
$ chmod +x /opt/aspera/var/myscript.sh - Add the line
/opt/aspera/var/myscript.shto /opt/aspera/var/aspera-prepost to callmyscript.sh. - Be sure there is no exit condition in
aspera-prepostbefore you call your script.
