~townsend/ubuntu-app-launch/remove-xmir-helpers

« back to all changes in this revision

Viewing changes to upstart-jobs/application-logrotate.conf

  • Committer: Chris Townsend
  • Date: 2017-03-24 13:06:32 UTC
  • mfrom: (269.1.38 ubuntu-app-launch)
  • Revision ID: christopher.townsend@canonical.com-20170324130632-n52ashmczuy0vy4y
MergeĀ lp:ubuntu-app-launch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
description "Application Logs need a shorter lifecycle"
2
 
 
3
 
# Run after log rotate
4
 
start on stopped logrotate
5
 
 
6
 
script
7
 
        logdir=${XDG_CACHE_HOME:-$HOME/.cache}/upstart
8
 
 
9
 
        #
10
 
        # If a log is older than two days we're clearing it
11
 
        #
12
 
        find ${logdir} -mtime +2 -name "application-click-*.log.[1-9].gz" -delete
13
 
        find ${logdir} -mtime +2 -name "application-legacy-*.log.[1-9].gz" -delete
14
 
        find ${logdir} -mtime +2 -name "application-snap-*.log.[1-9].gz" -delete
15
 
end script