From 9894864b71dc8a25e8cc3ad3e9602c3c186b0e1f Mon Sep 17 00:00:00 2001 From: minitux Date: Wed, 22 Jan 2014 19:02:03 +0100 Subject: [PATCH] Update redis-speed add password option Add password option in the redis connection --- plugins/redis/redis-speed | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/redis/redis-speed b/plugins/redis/redis-speed index d962505e..9864e6b6 100755 --- a/plugins/redis/redis-speed +++ b/plugins/redis/redis-speed @@ -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" );