Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- post_check /bin/zipscript [path mask]
- post_check runs AFTER an upload finishes
- post_check can be defined multiple times. Path mask is optional; if
- present, glftpd will only execute this script if the path mask matches
- the full path to where the file was uploaded. If the path doesn't
- match, glftpd will try to find another post_check declaration whose
- path does match, or one that doesn't have a path mask.
- Example:
- post_check none /site/public/* # disables zipscript in /site/public
- post_check /bin/special.sh /site/special/* # special zipscript
- post_check /bin/zipscript * # normal zipscript for all other paths
- If you want to enable upload resume in a certain path, you should
- disable the zipscript for that path, so that partial files are not
- deleted when the uploader loses connection.
- The post_check script receives 3 parameters from glftpd:
- $1 - the name of file uploaded
- $2 - the directory the file was uploaded to
- $3 - the CRC code of that file (if calc_crc was enabled, or 000000 otherwise)
- NOTE: If the uploader times out the CRC code will also be 000000, this to
- prevent that if one reconnected and started uploading the same file
- again but left an stalled upload session alive a bad crc would be passed,
- and the file would get deleted.
- If zipscript exits with 1 or 127, glftpd assumes there was a problem executing
- it. The file will not be deleted or unduped.
- If zipscript exits with anything bigger than 1, glftpd will assume that the
- file uploaded was bad and it will be deleted, the user's credits and stats will
- not be added, and the file will be removed from the dupe database.
- If zipscript exits with a number between 10 and 1010, glftpd will "sleep" for that
- many seconds minus 10 before continuing. This might be helpful if you want to
- prevent people from uploading a file that is being uploaded to their system over
- and over until it is complete.
- ex. To make a user wait 10 seconds after uploading a bad file, exit with 20.
- NOTE: exit code 127 is exempted: it will NOT cause a delay, it will be
- treated like exit code 1 instead.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement