echo track messages
[MQR.git] / scripts / mqr-subscribe.pl
index a7d232f..9744349 100755 (executable)
@@ -3,12 +3,9 @@ use warnings;
 use strict;
 use AnyEvent::Redis;
 
-our ( $redis_host, $redis_port );
-require 'config.pl';
-
 my $channel = $ARGV[0] || die "usage: $0 channel\n";
 
-my $sub = AnyEvent::Redis->new( host => $redis_host, port => $redis_port );
+my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT} );
 
 my $sub_cv = $sub->psubscribe($channel, sub {
        my($message, $chan) = @_;