From ff58f1f1c3cc3c45ec442191353d9da56b18effc Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 2 Apr 2021 18:02:42 +0200 Subject: [PATCH] Image trash clean --- debian/changelog | 2 +- debian/cron.d | 1 + package.json | 2 +- utils/image-clean.sh | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 utils/image-clean.sh diff --git a/debian/changelog b/debian/changelog index bfcc827d..f1b91a57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.407.43) stable; urgency=low +hedera-web (1.407.44) stable; urgency=low * Initial Release. diff --git a/debian/cron.d b/debian/cron.d index 73230e70..1037bb2c 100755 --- a/debian/cron.d +++ b/debian/cron.d @@ -6,4 +6,5 @@ MAILTO=webmaster 0 5 * * * root hedera-web.php -m edi/update 0 5 * * * root hedera-web.php -m misc/exchange-rate 0 0 * * * root hedera-web.php -m image/sync +0 1 * * * root /usr/share/hedera-web/utils/image-clean.sh > /dev/null 0 */1 * * * root /usr/share/hedera-web/utils/update-browscap.sh > /dev/null diff --git a/package.json b/package.json index 560893be..00e745c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.407.43", + "version": "1.407.44", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { diff --git a/utils/image-clean.sh b/utils/image-clean.sh new file mode 100644 index 00000000..2aa797b4 --- /dev/null +++ b/utils/image-clean.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +find /mnt/storage/image/.trash/* -maxdepth 0 -type d -ctime +7 -exec rm -rf {} \;