[Pkg-php-commits] [php/debian-sid] Don't delete used session files (Closes: #626640)

Ondřej Surý ondrej at sury.org
Sat May 14 09:35:40 UTC 2011


---
 debian/php5-common.php5.cron.d |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/debian/php5-common.php5.cron.d b/debian/php5-common.php5.cron.d
index f3fba39..dc25643 100644
--- a/debian/php5-common.php5.cron.d
+++ b/debian/php5-common.php5.cron.d
@@ -4,4 +4,4 @@
 #  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime
 
 # Look for and purge old sessions every 30 minutes
-09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete
+09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -execdir sh -c 'C=$(fuser "$0" 2>/dev/null | wc -w); [ "$C" -eq 0 ] && rm -f "$0"' {} \;
-- 
1.7.1




More information about the Pkg-php-commits mailing list