~ubuntu-branches/ubuntu/wily/acct/wily

« back to all changes in this revision

Viewing changes to debian/cron.daily

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-11-27 14:16:04 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061127141604-okslax01fi04q5qz
Tags: 6.4~pre1-2ubuntu1
* Merge from debian unstable, remaining changes:
  - remove stop links from rc0 and rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
if [ -x /usr/sbin/accton ]
4
4
then
 
5
        # Source defaults
5
6
        if [ -f /etc/default/acct ]
6
7
        then
7
8
                . /etc/default/acct
8
9
        else
9
 
                ACCT_LOGFILE="/var/log/account/pacct"
10
10
                ACCT_LOGGING="30"
11
11
        fi
12
12
 
13
 
        if [ -w "$ACCT_LOGFILE" ]
14
 
        then
15
 
                cd `dirname "$ACCT_LOGFILE"`
16
 
                savelog -g adm -m 0640 -u root -c $ACCT_LOGGING \
17
 
                        "$ACCT_LOGFILE" > /dev/null
18
 
        else
19
 
                cd /var/log/account
20
 
                savelog -g adm -m 0640 -u root -c $ACCT_LOGGING \
21
 
                        /var/log/account/pacct > /dev/null
22
 
        fi
 
13
        # Save log file
 
14
        cd /var/log/account
 
15
        savelog -g adm -m 0640 -u root -c "${ACCT_LOGGING}" /var/log/account/pacct > /dev/null
23
16
 
24
 
        /etc/init.d/acct stop > /dev/null
25
 
        /etc/init.d/acct start > /dev/null
 
17
        # Restart acct
 
18
        /etc/init.d/acct restart > /dev/null
26
19
fi
27
20
 
28
21
# This is needed because accton.c returns errno