5
###############################################################################
7
# Add the `gnats' system into cron
10
CRON_ALLOW='/etc/cron.allow'
11
AT_ALLOW='/etc/at.allow'
13
if [ "$1" = configure ]; then
16
# Make sure gnats has cron & at access
19
if [ -f $CRON_ALLOW ] && \
20
[ $(protect fgrep -c gnats $CRON_ALLOW) -eq 0 ]; then
21
echo 'gnats' >>$CRON_ALLOW
22
# echo "- \`gnats' has been added to the cron.allow file"
25
if [ -f $AT_ALLOW ] && \
26
[ $(protect fgrep -c gnats $AT_ALLOW) -eq 0 ]; then
27
echo 'gnats' >>$AT_ALLOW
28
# echo "- \`gnats' has been added to the at.allow file"
32
# Add the `gnats' crontab file
35
crontab -u gnats - <<EOF
36
5,15,25,35,45,55 * * * * /usr/lib/gnats/queue-pr --run
37
10 3 * * * /usr/lib/gnats/check-db