]> git.pld-linux.org Git - packages/awffull.git/blame - awffull.cron
- updated gettext BR
[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
0669167b 8if [ -n "$FORCE_USER" ]; then
9 if [ "$FORCE_USER" != "`id -un`" ]; then
10 echo "Wrong current user. $FORCE_USER is required!"
11 exit 1
12 fi
13fi
14
a5ade1a0
PG
15if [ -n "$ENABLE" ] && [ "$ENABLE" = "yes" -o "$ENABLE" = "YES" ]; then
16 LC_ALL=$LANG
17 export LANG
18 export LC_ALL
19
a5ade1a0 20 if [ -n "$MULTIPLE" ] && [ "$MULTIPLE" = "yes" -o "$MULTIPLE" = "YES" ]; then
955df397
PG
21 for config in $(ls /etc/awffull/*.conf 2>/dev/null); do\
22 CONFIG_LIST="${CONFIG_LIST} ${config}"
a5ade1a0 23 done
849e40dc
PG
24 else
25 CONFIG_LIST="/etc/awffull.conf"
a5ade1a0 26 fi
849e40dc 27
955df397
PG
28 for singleconfig in ${CONFIG_LIST}; do
29 if [ -n "${USE_DNSHISTORY}" ] && [ "${USE_DNSHISTORY}" = "yes" -o "${USE_DNSHISTORY}" = "YES" ]; then
96a4fa2a 30 TMPCONFIG=`mktemp -q /var/lib/dnshistory/awffull_config.XXXXXX`
955df397 31 LOGFILE=`grep ^LogFile ${singleconfig} | awk '{ print $2;}'`
96a4fa2a 32 grep -v ^LogFile ${singleconfig} > ${TMPCONFIG}
786d9ebc
PG
33 nice -n 19 dnshistory -f ${LOGFILE}
34 nice -n 19 dnshistory -T -f ${LOGFILE} | awffull ${AWFFULL_OPTS} -c ${TMPCONFIG} - ;
e7380d05 35 rm -f ${TMPCONFIG}
955df397 36 else
786d9ebc 37 nice -n 19 awffull ${AWFFULL_OPTS} -c ${singleconfig};
955df397
PG
38 fi
39 done
a5ade1a0 40fi
This page took 0.051325 seconds and 4 git commands to generate.