Created
December 24, 2013 05:10
-
-
Save darkhelmet/8109026 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RebootRequiredPlugin < Scout::Plugin | |
def build_report | |
reboot_required = system('file /var/run/reboot-required >/dev/null 2>&1') | |
report(:reboot_required => reboot_required ? 1 : 0) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UpdatesAvailablePlugin < Scout::Plugin | |
def build_report | |
total, security = `/usr/lib/update-notifier/apt-check 2>&1`.split(';').map(&:to_i) | |
report(:total_updates => total, :security_updates => security) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment