Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apt/lists/lock);
- my $last_update;
- foreach my $stamp_file (@stamp_files) {
- $last_update = -M $stamp_file;
- last if $last_update;
- }
- my $updatecolor;
- if ($last_update >= 7) {
- $updatecolor = 'red';
- } elsif ($last_update >= 1.5) {
- $updatecolor = 'yellow';
- } else {
- $updatecolor = 'green';
- }
Advertisement
Add Comment
Please, Sign In to add comment