4.2.2.3. CallbackDownload¶
4.2.2.3.1. Synopsis¶
This tag allows calling custom shell command on the server when user succesfully downloads a file. Working directory is not changed. Usual environment variables can be used from the command, such as USER, HOME, SSH_CONNECTION; path of the file is kept in LAST_FILE_PATH. Shell command result is written to log.
4.2.2.3.2. Options¶
Name | Default | Values | Since version | Context |
---|---|---|---|---|
CallbackDownload | null | shell cmd | 2.1 | Default,Group,IpRange,User,VirtualHost |
4.2.2.3.3. Examples¶
- Here, we use “env” system call to output environment variables in the log::
- <Default>
- CallbackDownload “env”
</Default>
- And this would call custom script::
- <Default>
- CallbackDownload “/bin/my-script.sh $LAST_FILE_PATH”
</Default>