Created
April 20, 2015 23:27
-
-
Save raphaelmerx/b3b4f1b5e569cd4f4f5c to your computer and use it in GitHub Desktop.
Delete scout server
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
# Script using scout api to delete the provided server | |
if ARGV.length < 4 | |
puts "Please specify hostname of scout server you wish to remove" | |
puts "USAGE: delete_scout_entry.rb <account name> <username> <password> <server hostname>" | |
exit(0) | |
end | |
require 'scout_api' | |
scout = Scout::Account.new(ARGV[0], ARGV[1], ARGV[2]) | |
server = Scout::Server.first(:name => ARGV[3]) | |
server_id = server.id | |
Scout::Server.delete(server_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment