| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/local/etc/rc.d/ |
Upload File : |
#!/bin/sh
# 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 "/usr/local/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:-"/usr/local/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="/usr/local/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"