bin/check-all-gpg-keys-for-expiry.rb
def run
    success, note, level = validate_gpg_and_home_directory
    note, level = sort_keys if success
    if !config[:do_not_display_json_message]
      puts generate_json_message(note, level)
    else
      message note
      select_appropriate_alert_level(level)
    end
    exit
  end
# Get all keys, sort them using their number of days left in ascending order
# and then display JSON message or send the message to Sensu
Get all keys, sort them using their number of days left in ascending order
and then display JSON message or send the message to Sensu
Get all keys sort them using their number of days left in ascending order and then display JSON message or send the message to Sensu
def run
    success, note, level = validate_gpg_and_home_directory
    note, level = sort_keys if success
    if !config[:do_not_display_json_message]
      puts generate_json_message(note, level)
    else
      message note
      select_appropriate_alert_level(level)
    end
    exit
  end
def run success , note , level = validate_gpg_and_home_directory note , level = sort_keys if success if ! config [ :do_not_display_json_message ] puts generate_json_message ( note , level ) else message note select_appropriate_alert_level ( level ) end exit end
Get all keys, sort them using their number of days left in ascending order
and then display JSON message or send the message to Sensu
Get all keys sort them using their number of days left in ascending order and then display JSON message or send the message to Sensu