mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
mail/exim: add exim_tidydb_filter for periodic tidydb job
It allows to filter/transform the output from the tidydb that is sometimes large and not very much suitable for informational mails from cron. Feature safe: yes
This commit is contained in:
parent
f11416edfa
commit
359f35d006
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=307267
1 changed files with 12 additions and 4 deletions
|
@ -16,12 +16,13 @@ fi
|
|||
|
||||
: ${exim_tidydb_enable="YES"}
|
||||
: ${exim_tidydb="%%PREFIX%%/sbin/exim_tidydb"}
|
||||
# Set this to arbitrary shell command to filter
|
||||
# the output from this periodic script, for example,
|
||||
# exim_tidydb_filter="| tail -100".
|
||||
: ${exim_tidydb_filter=""}
|
||||
: ${exim_dbdir="/var/spool/exim"}
|
||||
|
||||
case "$exim_tidydb_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
echo ""
|
||||
echo "Tidying Exim hints databases:"
|
||||
tidy () {
|
||||
for db in "$exim_dbdir"/db/*.lockfile; do
|
||||
[ "$db" = "$exim_dbdir/db/*.lockfile" ] && continue
|
||||
echo
|
||||
|
@ -30,6 +31,13 @@ case "$exim_tidydb_enable" in
|
|||
"$exim_tidydb" "$exim_dbdir" "$db_name"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
case "$exim_tidydb_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
echo ""
|
||||
echo "Tidying Exim hints databases:"
|
||||
eval tidy "$exim_tidydb_filter"
|
||||
rc=1;;
|
||||
|
||||
*) rc=0;;
|
||||
|
|
Loading…
Add table
Reference in a new issue