|
|
|
|
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
|
|
|
|
|
##
|
|
|
|
|
## rc.apache2 -- Run-Commands
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
%config
|
|
|
|
|
apache2_enable="$openpkg_rc_def"
|
|
|
|
|
apache2_log_files="@l_prefix@/var/apache2/log/access.log"
|
|
|
|
|
apache2_log_rotsteps="10"
|
|
|
|
|
apache2_log_rotminsize="10M"
|
|
|
|
|
apache2_log_rotcomplevel="9"
|
|
|
|
|
apache2_log_rotprolog="true"
|
|
|
|
|
apache2_log_rotepilog="true"
|
|
|
|
|
apache2_err_files="@l_prefix@/var/apache2/log/error.log"
|
|
|
|
|
apache2_err_rotsteps="10"
|
|
|
|
|
apache2_err_rotminsize="1M"
|
|
|
|
|
apache2_err_rotcomplevel="9"
|
|
|
|
|
apache2_err_rotprolog="true"
|
|
|
|
|
apache2_err_rotepilog="true"
|
|
|
|
|
|
|
|
|
|
%start -p 200 -u @l_susr@
|
|
|
|
|
rcService apache2 enable yes || exit 0
|
|
|
|
|
@l_prefix@/sbin/apachectl start
|
|
|
|
|
|
|
|
|
|
%stop -p 200 -u @l_susr@
|
|
|
|
|
rcService apache2 enable yes || exit 0
|
|
|
|
|
@l_prefix@/sbin/apachectl stop
|
|
|
|
|
|
|
|
|
|
%restart -u @l_susr@
|
|
|
|
|
rcService apache2 enable yes || exit 0
|
|
|
|
|
@l_prefix@/sbin/apachectl restart
|
|
|
|
|
|
|
|
|
|
%daily -u @l_susr@
|
|
|
|
|
rcService apache2 enable yes || exit 0
|
|
|
|
|
if [ ".$apache2_log_files" != . ]; then
|
|
|
|
|
shtool rotate -f \
|
|
|
|
|
-n ${apache2_log_rotsteps} -s ${apache2_log_rotminsize} -d \
|
|
|
|
|
-z ${apache2_log_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
|
|
|
|
|
-P "$apache2_log_rotprolog" \
|
|
|
|
|
-E "@l_prefix@/sbin/apachectl restart; $apache2_log_rotepilog" \
|
|
|
|
|
$apache2_log_files
|
|
|
|
|
fi
|
|
|
|
|
if [ ".$apache2_err_files" != . ]; then
|
|
|
|
|
shtool rotate -f \
|
|
|
|
|
-n ${apache2_err_rotsteps} -s ${apache2_err_rotminsize} -d \
|
|
|
|
|
-z ${apache2_err_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
|
|
|
|
|
-P "$apache2_err_rotprolog" \
|
|
|
|
|
-E "@l_prefix@/sbin/apachectl restart; $apache2_err_rotepilog" \
|
|
|
|
|
$apache2_err_files
|
|
|
|
|
fi
|
|
|
|
|
|