~ubuntu-branches/ubuntu/dapper/gnats/dapper

« back to all changes in this revision

Viewing changes to debian/scripts/addcron

  • Committer: Bazaar Package Importer
  • Author(s): Chad Walstrom
  • Date: 2005-03-07 17:56:31 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050307175631-agtm10dvjbemuc64
Tags: 4.1.0-0
* New upstream version
* debian/rules: now uses '--with-lispdir' option instead of environment
  variable overloading. Re-enabled optimization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
set -e
4
 
 
5
 
###############################################################################
6
 
#
7
 
# Add the `gnats' system into cron
8
 
#
9
 
 
10
 
CRON_ALLOW='/etc/cron.allow'
11
 
AT_ALLOW='/etc/at.allow'
12
 
 
13
 
if [ "$1" = configure ]; then
14
 
 
15
 
  #
16
 
  # Make sure gnats has cron & at access
17
 
  #
18
 
 
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"
23
 
  fi
24
 
 
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"
29
 
  fi
30
 
 
31
 
  #
32
 
  # Add the `gnats' crontab file
33
 
  #
34
 
 
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
38
 
EOF
39
 
 
40
 
fi