summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-12-13 10:18:48 +0200
committerPaul Buetow <paul@buetow.org>2024-12-13 10:18:48 +0200
commit057cd86148741a8b7e32e2c8f24afcc449b4c00c (patch)
tree1b0a303e7c700c58735908106b8ee8e286ab4a95
parent49a70b8bf735e32afb1020eb60da6d264a0a5c28 (diff)
refactor
-rw-r--r--foostats.pl13
1 files changed, 5 insertions, 8 deletions
diff --git a/foostats.pl b/foostats.pl
index 50be4f5..5aa1e86 100644
--- a/foostats.pl
+++ b/foostats.pl
@@ -407,20 +407,17 @@ package main {
}
sub replicate ($stats_dir, $partner_node) {
- unless (defined $partner_node) {
- # Default values if partner node not set.
- $partner_node = hostname eq 'fishfinger.buetow.org'
- ? 'blowfish.buetow.org'
- : 'fishfinger.buetow.org';
- }
-
Foostats::Replicator->new(stats_dir => $stats_dir)->replicate($partner_node);
}
sub pretty_print () { say 'pretty_print not yet implemented' }
- my ($parse_logs, $replicate, $pretty_print, $partner_node);
+ my ($parse_logs, $replicate, $pretty_print);
+
+ # With default values
my $stats_dir = '/var/www/htdocs/buetow.org/self/foostats';
+ my $partner_node = hostname eq 'fishfinger.buetow.org'
+ ? 'blowfish.buetow.org' : 'fishfinger.buetow.org';
GetOptions 'parse-logs' => \$parse_logs,
'replicate' => \$replicate,