[omd-commits] OMD Git: omd: FIX: PHP-Sessions were not cleaned up during run time

git version control git at mathias-kettner.de
Tue Jan 12 15:42:45 CET 2016


Module:   omd
Branch:   master
Commit:   52474b9a51e274acfa69cdfae6591201c4d96893
URL:      http://omdistro.org/projects/omd/repository/revisions/52474b9a51e274acfa69cdfae6591201c4d96893

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Jan 12 15:41:27 2016 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Jan 12 15:41:27 2016 +0100

FIX: PHP-Sessions were not cleaned up during run time

The sessions were only cleared on system boot. Added a cron job
to the sites that runs on a daily base at 0:10 to search the
session directory at tmp/php/session to remove all files which
are older than 24 hours.

---

 Changelog                                        |    5 +++++
 packages/apache-omd/skel/etc/cron.d/php-sessions |    2 ++
 2 files changed, 7 insertions(+)

diff --git a/Changelog b/Changelog
index a1f0a36..5b46008 100644
--- a/Changelog
+++ b/Changelog
@@ -20,6 +20,11 @@ This file documents the revision history for the Open Monitoring Distribution
               it will be changed to own mode during update. You might need
               to reload/restart your system apache manually once to apply
               the change.
+	    - FIX: PHP-Sessions were not cleaned up during run time. The sessions
+	      were only cleared on system boot.
+	      Added a cron job to the sites that runs on a daily base at 0:10
+	      to search the session directory at tmp/php/session to remove all
+	      files which are older than 24 hours
           - NagVis:
             - Update to version 1.9b3
           - Icinga: Update to 1.13.3
diff --git a/packages/apache-omd/skel/etc/cron.d/php-sessions b/packages/apache-omd/skel/etc/cron.d/php-sessions
new file mode 100644
index 0000000..d44a5eb
--- /dev/null
+++ b/packages/apache-omd/skel/etc/cron.d/php-sessions
@@ -0,0 +1,2 @@
+# Once a day, at 00:10, search for PHP sessions that are older than 1 day and delete them
+10 0 * * * find $OMD_ROOT/tmp/php/session -name sess_\* -mtime +1 -exec rm {} \;



More information about the omd-commits mailing list