3 # $FreeBSD: www/apache22/files/htcacheclean.in 340872 2014-01-24 00:14:07Z mat $
5 # PROVIDE: htcacheclean
7 # Configuration settings for htcacheclean in /etc/rc.conf
9 # htcacheclean_enable (bool)
10 # Set to "NO" by default
11 # Set it to "YES" to enable htcacheclean
13 # htcacheclean_cache (str) Set to "%%PREFIX%%/www/proxy" by default Set the
14 # location of the mod_disk_cache CacheRoot This should be the same as whats in
17 # htcacheclean_cachelimit (str) Set to "512M" by default Sets the size
18 # htcacheclean should prune the disk cache to expressed in bytes by default, K
19 # for kilobytes, M for megabytes.
21 # htcacheclean_interval (num)
22 # Set to "10" by default
23 # Sets how frequently in munutes htcacheclean wakes up and prunes the cache
25 # htcacheclean_args (str)
26 # Set to "-t -n -i" by default
27 # Sets extra command-line arguments to htcacheclean
28 # -t Delete all empty directories
29 # -n Be nice by sleeping occasionally to not saturate the I/O bandwith of the disk
30 # -i Run only when there was a modification of the disk cache
35 rcvar=htcacheclean_enable
37 load_rc_config "${name}"
39 htcacheclean_enable="${htcacheclean_enable:-"NO"}"
40 htcacheclean_cache="${htcacheclean_cache:-"%%PREFIX%%/www/proxy"}"
41 htcacheclean_cachelimit="${htcacheclean_cachelimit:-"512M"}"
42 htcacheclean_interval="${htcacheclean_interval:-"60"}"
43 htcacheclean_args="${htcacheclean_args:-"-t -n -i"}"
45 start_precmd="htc_check"
46 restart_precmd="htc_check"
47 restart_reload="htc_check"
49 command="%%PREFIX%%/sbin/htcacheclean"
50 flags="-p${htcacheclean_cache} -d${htcacheclean_interval} -l${htcacheclean_cachelimit} ${htcacheclean_args}"
51 required_dirs="${htcacheclean_cache}"
55 [ ! -d ${htcacheclean_cache} ] && {