When some events occurs (dir creation, upload, etc), the server sends an event which can be connected to a command.
If the command needs arguments you just have to specify them after the command. You can use cookies in the arguments, they will be replaced as usual.
cscript = POSTUPLOAD /path/to/my/zipscript.sh %username
Table 7-1. Events
Event | Description |
LOGIN | User logged in |
LOGOUT | User logged out, or timed out |
MKDIR | User created a directory |
RMDIR | User removed a directory |
PREUPLOAD | User is about to upload file |
POSTUPLOAD | User finished an upload |
PREDOWNLOAD | User is about to download file |
POSTDOWNLOAD | User finished a download |
Please note that the return code of your command or program is important: a return code of 0 means the command is successfull, other codes are reserved for errors.
For example, if you return a code different from 0 for the POSTDOWNLOAD or POSTUPLOAD event, then the transfer will be denied.