@@ -5,3 +5,5 @@ perl script based on `vnstat-metrics.cgi` which listens on `5599` and returns me
## requirements
`cpan install HTTP::Daemon`
+
+set `VNSTAT_METRICS_HOST` or it will default to localhost
@@ -16,7 +16,7 @@ my @data_resolutions = ('fiveminute', 'hour', 'day', 'month', 'year');
# Create an HTTP::Daemon instance listening on port 9955
my $d = HTTP::Daemon->new(
- # LocalAddr => 'localhost',
+ LocalAddr => $ENV{'VNSTAT_METRICS_HOST'} // 'localhost',
LocalPort => 9955,
) || die "Cannot create HTTP::Daemon instance: $!";