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