Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 8afd136856fb7e8331305177a132b2b0 > files > 3

cronie-anacron-1.4.7-1.mga1.i586.rpm

#!/bin/bash
#in case file doesn't exist 
if test -r /var/spool/anacron/cron.daily; then
    day=`cat /var/spool/anacron/cron.daily`
fi
if [ `date +%Y%m%d` = "$day" ]; then
    exit 0;
fi

# in case anacron is already running,
# there will be log (daemon won't be running twice).
if test -x /usr/bin/on_ac_power; then
    /usr/bin/on_ac_power &> /dev/null
    if test $? -eq 1; then
    exit 0
    fi
fi
/usr/sbin/anacron -s