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:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue