mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Merge pull request #428 from minitux/patch-1
Update redis-speed add password option
This commit is contained in:
commit
21d2262faa
1 changed files with 2 additions and 1 deletions
|
@ -25,9 +25,10 @@ use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
|
|
||||||
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
|
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
|
||||||
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 6379;
|
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 6379;
|
||||||
|
my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : undef ;
|
||||||
|
|
||||||
my $server = "$HOST:$PORT";
|
my $server = "$HOST:$PORT";
|
||||||
my $r = Redis->new( server => sprintf("%s:%d", $HOST, $PORT) );
|
my $r = Redis->new( server => $server, password => $PASSWORD );
|
||||||
|
|
||||||
my $config = ( defined $ARGV[0] and $ARGV[0] eq "config" );
|
my $config = ( defined $ARGV[0] and $ARGV[0] eq "config" );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue