13 linhas
321 B
Plaintext
13 linhas
321 B
Plaintext
|
#!/bin/sh
|
||
|
set -e
|
||
|
source /root/uploader_config
|
||
|
cd $UPLOADER_UPLOAD_DIR
|
||
|
cat $UPLOADER_EXPIRATION_FILE | while read line ; do
|
||
|
expires=$( echo $line | cut -d":" -f1 )
|
||
|
what=$( echo $line | cut -d":" -f2 )
|
||
|
if [ $expires -le $( date +%s ) ] ; then
|
||
|
rm -rf "$what"
|
||
|
sed -e "/$expires:$what/d" -i $UPLOADER_EXPIRATION_FILE
|
||
|
fi
|
||
|
done
|