1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 10:28:36 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env ruby
#
# Plugin author: Gunnar Wolf <gwolf@gwolf.org>
#
#
# You are hereby granted authorization to copy, use, modify, distribute,
# and in general do anything you please with this plugin. It is too simple
# even to GPL-protect it.
@ -18,7 +18,7 @@ require 'open-uri'
def get_conf
# Default values
conf = {:host => '127.0.0.1', :port => 8000,
conf = {:host => '127.0.0.1', :port => 8000,
:username => 'admin', :password => 'hackme' }
conf.keys.each do |key|
env_key = sprintf('icecast_%s', key)
@ -28,10 +28,10 @@ def get_conf
end
def get_data(conf)
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
conf[:host], conf[:port]),
:http_basic_authentication=>[conf[:username],
:http_basic_authentication=>[conf[:username],
conf[:password]]))
rescue OpenURI::HTTPError
puts "Cannot connect: HTTP connection error"