mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Add environment for variables with default values
This commit is contained in:
parent
f3c8d9519f
commit
38a07950d4
1 changed files with 5 additions and 6 deletions
|
@ -24,12 +24,11 @@ use strict;
|
||||||
use Net::Telnet;
|
use Net::Telnet;
|
||||||
|
|
||||||
# CONFIG HERE!
|
# CONFIG HERE!
|
||||||
my $hostname = "localhost"; # serveraddress
|
my $hostname = $ENV{hostname} || "localhost"; # serveraddress
|
||||||
my $port = 10011; # querryport (default: 10011)
|
my $port = $ENV{port} || 10011; # querryport (default: 10011)
|
||||||
my @serverids = (1); # array of virtualserverids (1,2,3,4,...)
|
my @serverids = $ENV{serverids} || (1); # array of virtualserverids (1,2,3,4,...)
|
||||||
|
my $username = $ENV{username} || ""; # only set if the default queryuser hasn't enough rights (should work without this)
|
||||||
my $username = ""; # only set if the default queryuser hasn't enough rights (should work without this)
|
my $password = $ENV{password} || "";
|
||||||
my $password = "";
|
|
||||||
|
|
||||||
# SCRIPT START!
|
# SCRIPT START!
|
||||||
if(exists $ARGV[0] and $ARGV[0] eq "config")
|
if(exists $ARGV[0] and $ARGV[0] eq "config")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue