mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Update redis-speed add password option
Add password option in the redis connection
This commit is contained in:
parent
84866ca679
commit
9894864b71
@ -25,9 +25,10 @@ use Time::HiRes qw( gettimeofday tv_interval );
|
||||
|
||||
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
|
||||
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 6379;
|
||||
my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : undef ;
|
||||
|
||||
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" );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user