Files
ports/www/apache24/files/htcacheclean.in
T
Olli Hauer fa82723bda - new port www/apache24
The Apache HTTP Server Project is an effort to develop and maintain an
open-source HTTP server for various modern desktop and server operating
systems, such as UNIX and Windows NT. The goal of this project is to
provide a secure, efficient and extensible server which provides HTTP
services in sync with the current HTTP standards.
The 2.x branch of Apache Web Server includes several improvements like
threading, use of APR, native IPv6 and SSL support, and many more.

WWW: http://httpd.apache.org/

Note:
 Since apache24 does not enable every module by default in httpd.conf the
 list of modules to build was preselected to match build param
  --enable-modules=most

 MPM selection is now an OPTION also if the MPM is build statically or
 dynamically. In the later case all modules are build/installed but only
 the selected MPM has an entry in httpd.conf (see apache issue 53882)

 Per default the MPM prefork (static) will be build, to get the best
 compatibility.

 Custom variants like itk/peruser are not supported at the moment.

 Port based on my work prototype from the apache@ list and patch from
 PR 174617

with hat apache@

PR:		174617
Submitted by:	<swall@redcom.com>
2013-03-26 21:35:33 +00:00

63 lines
1.7 KiB
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: htcacheclean
#
# Configuration settings for htcacheclean in /etc/rc.conf
#
# htcacheclean_enable (bool)
# Set to "NO" by default
# Set it to "YES" to enable htcacheclean
#
# htcacheclean_cache (str) Set to "%%PREFIX%%/www/proxy" by default Set the
# location of the mod_disk_cache CacheRoot This should be the same as whats in
# your httpd.conf
#
# htcacheclean_cachelimit (str) Set to "512M" by default Sets the size
# htcacheclean should prune the disk cache to expressed in bytes by default, K
# for kilobytes, M for megabytes.
#
# htcacheclean_interval (num)
# Set to "10" by default
# Sets how frequently in munutes htcacheclean wakes up and prunes the cache
#
# htcacheclean_args (str)
# Set to "-t -n -i" by default
# Sets extra command-line arguments to htcacheclean
# -t Delete all empty directories
# -n Be nice by sleeping occasionally to not saturate the I/O bandwith of the disk
# -i Run only when there was a modification of the disk cache
. /etc/rc.subr
name="htcacheclean"
rcvar=htcacheclean_enable
load_rc_config "${name}"
htcacheclean_enable="${htcacheclean_enable:-"NO"}"
htcacheclean_cache="${htcacheclean_cache:-"%%PREFIX%%/www/proxy"}"
htcacheclean_cachelimit="${htcacheclean_cachelimit:-"512M"}"
htcacheclean_interval="${htcacheclean_interval:-"60"}"
htcacheclean_args="${htcacheclean_args:-"-t -n -i"}"
start_precmd="htc_check"
restart_precmd="htc_check"
restart_reload="htc_check"
command="%%PREFIX%%/sbin/htcacheclean"
flags="-p${htcacheclean_cache} -d${htcacheclean_interval} -l${htcacheclean_cachelimit} ${htcacheclean_args}"
required_dirs="${htcacheclean_cache}"
htc_check()
{
[ ! -d ${htcacheclean_cache} ] && {
echo ""
return 1
}
return 0
}
run_rc_command "$1"