2 changed files with 82 additions and 6 deletions
@ -0,0 +1,51 @@
|
||||
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc |
||||
## |
||||
## rc.htdig -- Run-Commands |
||||
## |
||||
|
||||
%config |
||||
htdig_enable="$openpkg_rc_def" |
||||
htdig_update="daily" |
||||
htdig_flags="-v" |
||||
htdig_log_prolog="true" |
||||
htdig_log_epilog="true" |
||||
htdig_log_numfiles="10" |
||||
htdig_log_minsize="1M" |
||||
htdig_log_complevel="9" |
||||
|
||||
%common |
||||
htdig_logfile="@l_prefix@/var/htdig/run/htdig.log" |
||||
htdig_update () { |
||||
@l_prefix@/bin/rundig $htdig_flags >>$htdig_logfile |
||||
} |
||||
|
||||
%quarterly -u @l_rusr@ |
||||
rcService htdig enable yes || exit 0 |
||||
if [ ".$htdig_update" = .quarterly ]; then |
||||
htdig_update || exit $? |
||||
fi |
||||
|
||||
%hourly -u @l_rusr@ |
||||
rcService htdig enable yes || exit 0 |
||||
if [ ".$htdig_update" = .hourly ]; then |
||||
htdig_update || exit $? |
||||
fi |
||||
|
||||
%daily -u @l_rusr@ |
||||
rcService htdig enable yes || exit 0 |
||||
if [ ".$htdig_update" = .daily ]; then |
||||
htdig_update || exit $? |
||||
fi |
||||
shtool rotate -f \ |
||||
-n ${htdig_log_numfiles} -s ${htdig_log_minsize} -d \ |
||||
-z ${htdig_log_complevel} -m 644 -o @l_rusr@ -g @l_rgrp@ \ |
||||
-P "${htdig_log_prolog}" \ |
||||
-E "${htdig_log_epilog}" \ |
||||
$htdig_logfile |
||||
|
||||
%weekly -u @l_rusr@ |
||||
rcService htdig enable yes || exit 0 |
||||
if [ ".$htdig_update" = .weekly ]; then |
||||
htdig_update || exit $? |
||||
fi |
||||
|
Loading…
Reference in new issue