File: temp-cleanup.cron

package info (click to toggle)
horde3 3.1.3-4etch7
  • links: PTS
  • area: main
  • in suites: etch
  • size: 22,876 kB
  • ctags: 18,071
  • sloc: php: 75,151; xml: 2,979; sql: 1,069; makefile: 79; sh: 64
file content (42 lines) | stat: -rw-r--r-- 1,560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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.
#

[ -f /etc/default/horde3 ] && . /etc/default/horde3

# The location of PHP's temporary directory
echo ${TMP_DIR:=/tmp} > /dev/null

# 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 {} \;