42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/sh
|
|
|
|
# This is an example cron job shell script which will clean up any
|
|
# temporary files which may get stranded by Horde users in the
|
|
# webserver's temporary directory.
|
|
#
|
|
# You may have to change /tmp to another location depending on your
|
|
# configuration. Other modifications may also be required.
|
|
#
|
|
# This script is provided as-is and is to be used at your own risk.
|
|
# Horde and the authors accept no responsibility for any damages or
|
|
# loses caused by this script whether indirect, incidental, or
|
|
# consequential, whether or not such damages could be forseen.
|
|
#
|
|
# How to use this script will depend on your system. For some systems,
|
|
# it is as simply as putting this file in the /etc/cron.daily directory.
|
|
# For others, more or different setup will be required. See the
|
|
# documentation for your systems job scheduler for more information.
|
|
#
|
|
|
|
# The location of PHP's temporary directory
|
|
TMP_DIR=/tmp
|
|
|
|
|
|
# MSWord attachments (generated by the MSword viewer)
|
|
find $TMP_DIR -type f -name msword\* -ctime +2 -exec rm -f {} \;
|
|
|
|
# IMP attachments
|
|
find $TMP_DIR -type f -name impatt\* -ctime +2 -exec rm -f {} \;
|
|
|
|
# Klutz temporary files
|
|
find $TMP_DIR -type f -name Klutz\* -ctime +2 -exec rm -f {} \;
|
|
|
|
# Spell checking temporary files
|
|
find $TMP_DIR -type f -name spell\* -ctime +2 -exec rm -f {} \;
|
|
|
|
# VFS temporary files
|
|
find $TMP_DIR -type f -name vfs\* -ctime +2 -exec rm -f {} \;
|
|
|
|
# Files from cancelled imports
|
|
find $TMP_DIR -type f -name import\* -ctime +2 -exec rm -f {} \;
|