[Pkg-php-commits] [php/debian-sid] Update cron.d code to even safer variant (Courtesy of Bob Proulx)
Ondřej Surý
ondrej at sury.org
Sat May 14 21:07:34 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 dc25643..d055e6c 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) -execdir sh -c 'C=$(fuser "$0" 2>/dev/null | wc -w); [ "$C" -eq 0 ] && rm -f "$0"' {} \;
+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 'test -z "$(fuser "$0")"' {} \; -delete
--
1.7.1
More information about the Pkg-php-commits
mailing list