#!/bin/sh
#
# This script does cleaning for PHP
#

# The directory where sessions are stored
SESSDIR=/var/cache/php/session

# Maximum time to keep session files in minutes (1440 = 60*24)
MAXTIME=1440

# Remove all files which have been last modified
# more than MAXTIME minutes ago
find "$SESSDIR" -mmin +"$MAXTIME" -print0 | xargs -0r rm -f --
