]> git.pld-linux.org Git - packages/awffull.git/blame - awffull.cron
- fix no/nb and zh/zh_CN
[packages/awffull.git] / awffull.cron
CommitLineData
a5ade1a0
PG
1#!/bin/sh
2
3AWFFULL_OPTS=""
955df397 4CONFIG_LIST=""
a5ade1a0
PG
5[ -f /etc/sysconfig/awffull ] && . /etc/sysconfig/awffull
6umask 0022
7
8if [ -n "$ENABLE" ] && [ "$ENABLE" = "yes" -o "$ENABLE" = "YES" ]; then
9 LC_ALL=$LANG
10 export LANG
11 export LC_ALL
12
ab5f1b39 13 if [ -n "$QUIET" ] && [ "$QUIET" = "yes" -o "$QUIET" = "YES" ]; then
a5ade1a0 14 AWFFULL_OPTS="-q"
ab5f1b39
PG
15 elif [ -n "$REALLY_QUIET" ] && [ "$REALLY_QUIET" = "yes" -o "$REALLY_QUIET" = "YES" ]; then
16 AWFFULL_OPTS="-Q"
a5ade1a0
PG
17 fi
18
a5ade1a0 19 if [ -n "$MULTIPLE" ] && [ "$MULTIPLE" = "yes" -o "$MULTIPLE" = "YES" ]; then
955df397
PG
20 for config in $(ls /etc/awffull/*.conf 2>/dev/null); do\
21 CONFIG_LIST="${CONFIG_LIST} ${config}"
a5ade1a0 22 done
849e40dc
PG
23 else
24 CONFIG_LIST="/etc/awffull.conf"
a5ade1a0 25 fi
849e40dc 26
955df397
PG
27 for singleconfig in ${CONFIG_LIST}; do
28 if [ -n "${USE_DNSHISTORY}" ] && [ "${USE_DNSHISTORY}" = "yes" -o "${USE_DNSHISTORY}" = "YES" ]; then
96a4fa2a 29 TMPCONFIG=`mktemp -q /var/lib/dnshistory/awffull_config.XXXXXX`
955df397 30 LOGFILE=`grep ^LogFile ${singleconfig} | awk '{ print $2;}'`
96a4fa2a 31 grep -v ^LogFile ${singleconfig} > ${TMPCONFIG}
786d9ebc
PG
32 nice -n 19 dnshistory -f ${LOGFILE}
33 nice -n 19 dnshistory -T -f ${LOGFILE} | awffull ${AWFFULL_OPTS} -c ${TMPCONFIG} - ;
e7380d05 34 rm -f ${TMPCONFIG}
955df397 35 else
786d9ebc 36 nice -n 19 awffull ${AWFFULL_OPTS} -c ${singleconfig};
955df397
PG
37 fi
38 done
a5ade1a0 39fi
This page took 0.434398 seconds and 4 git commands to generate.