Package apache2-htcacheclean: Скрипты

Post install

if ! grep -qsm1 '^[[:space:]]*HTCACHECLEAN_PATH=' /etc/sysconfig/htcacheclean; then 
	if grep -qsm1 '^[[:space:]]*CACHEPATH=' /etc/sysconfig/htcacheclean; then 
		echo 'Warning: The file /etc/sysconfig/htcacheclean' 
		echo '    variable CACHEPATH renamed to HTCACHECLEAN_PATH' 
		sed -ri 's/^([[:space:]]*)CACHEPATH(=.*)$/#\0\n\1HTCACHECLEAN_PATH\2/' /etc/sysconfig/htcacheclean 
	fi 
fi 


if ! grep -qsm1 '^[[:space:]]*HTCACHECLEAN_DAEMON_INTERVAL=' /etc/sysconfig/htcacheclean; then 
	if grep -qsm1 '^[[:space:]]*INTERVAL=' /etc/sysconfig/htcacheclean; then 
		echo 'Warning: The file /etc/sysconfig/htcacheclean' 
		echo '    variable INTERVAL renamed to HTCACHECLEAN_DAEMON_INTERVAL' 
		sed -ri 's/^([[:space:]]*)INTERVAL(=.*)$/#\0\n\1HTCACHECLEAN_DAEMON_INTERVAL\2/' /etc/sysconfig/htcacheclean 
	fi 
fi 


if ! grep -qsm1 '^[[:space:]]*HTCACHECLEAN_SIZE=' /etc/sysconfig/htcacheclean; then 
	if grep -qsm1 '^[[:space:]]*LIMIT=' /etc/sysconfig/htcacheclean; then 
		echo 'Warning: The file /etc/sysconfig/htcacheclean' 
		echo '    variable LIMIT renamed to HTCACHECLEAN_SIZE' 
		sed -ri 's/^([[:space:]]*)LIMIT(=.*)$/#\0\n\1HTCACHECLEAN_SIZE\2/' /etc/sysconfig/htcacheclean 
	fi 
fi 


if ! grep -qsm1 '^[[:space:]]*HTCACHECLEAN_OPTIONS=' /etc/sysconfig/htcacheclean; then 
	if grep -qsm1 '^[[:space:]]*OPTIONS=' /etc/sysconfig/htcacheclean; then 
		echo 'Warning: The file /etc/sysconfig/htcacheclean' 
		echo '    variable OPTIONS renamed to HTCACHECLEAN_OPTIONS' 
		sed -ri 's/^([[:space:]]*)OPTIONS(=.*)$/#\0\n\1HTCACHECLEAN_OPTIONS\2/' /etc/sysconfig/htcacheclean 
	fi 
fi 


if [ $1 -ge 2 ]; then 
	/usr/sbin/control-restore htcacheclean-run 
else 
	for facility in htcacheclean-run; do 
		/usr/sbin/control "$facility" auto 
	done 
fi 


if [ $1 -ge 2 ]; then 
	/usr/sbin/control-restore htcacheclean-mode 
else 
	for facility in htcacheclean-mode; do 
		/usr/sbin/control "$facility" daemon 
	done 
fi 

if [ $1 -eq 1 ]; then
	/usr/sbin/post_service htcacheclean
fi
exit 0
Pre install

if [ $1 -ge 2 ]; then 
	/usr/sbin/control-dump htcacheclean-run 
fi 


if [ $1 -ge 2 ]; then 
	/usr/sbin/control-dump htcacheclean-mode 
fi 

exit 0
Pre uninstall

1
2
3
4
if [ $1 -eq 0 ]; then
    /usr/sbin/preun_service htcacheclean
fi
exit 0