You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
24 years ago
|
#!@l_prefix@/lib/rpm/bash @l_prefix@/etc/rc
|
||
|
##
|
||
|
## rc.apache -- Apache Administration Run-Commands
|
||
|
##
|
||
|
|
||
|
%config
|
||
|
apache_enable="yes"
|
||
|
apache_log_files="@l_prefix@/var/apache/log/access.log"
|
||
|
apache_log_rotsteps="10"
|
||
|
apache_log_rotminsize="10M"
|
||
|
apache_log_rotcomplevel="9"
|
||
|
apache_log_rotprolog="true"
|
||
|
apache_log_rotepilog="true"
|
||
|
apache_err_files="@l_prefix@/var/apache/log/error.log"
|
||
|
apache_err_rotsteps="10"
|
||
|
apache_err_rotminsize="1M"
|
||
|
apache_err_rotcomplevel="9"
|
||
|
apache_err_rotprolog="true"
|
||
|
apache_err_rotepilog="true"
|
||
|
|
||
|
%start -p 200 -u root
|
||
|
opServiceEnabled apache || exit 0
|
||
|
@l_prefix@/sbin/apachectl start
|
||
|
|
||
|
%stop -p 200 -u root
|
||
|
opServiceEnabled apache || exit 0
|
||
|
@l_prefix@/sbin/apachectl stop
|
||
|
sleep 2
|
||
|
|
||
|
%restart -u root
|
||
|
opServiceEnabled apache || exit 0
|
||
|
@l_prefix@/sbin/apachectl restart
|
||
|
|
||
|
%daily -u root
|
||
|
opServiceEnabled apache || exit 0
|
||
|
if [ ".$apache_log_files" != . ]; then
|
||
|
shtool rotate -f \
|
||
|
-n${apache_log_rotsteps} -s${apache_log_rotminsize} -d
|
||
|
-z${apache_log_rotcomplevel} -o@l_fsusr@ -o@l_fsgrp@ -m644 \
|
||
|
-P "$apache_log_rotprolog" \
|
||
|
-E "@l_prefix@/sbin/apachectl restart; $apache_log_rotepilog" \
|
||
|
$apache_log_files
|
||
|
fi
|
||
|
if [ ".$apache_err_files" != . ]; then
|
||
|
shtool rotate -f \
|
||
|
-n${apache_err_rotsteps} -s${apache_err_rotminsize} -d
|
||
|
-z${apache_err_rotcomplevel} -o@l_fsusr@ -o@l_fsgrp@ -m644 \
|
||
|
-P "$apache_err_rotprolog" \
|
||
|
-E "@l_prefix@/sbin/apachectl restart; $apache_err_rotepilog" \
|
||
|
$apache_err_files
|
||
|
fi
|
||
|
|