diff options
| author | Paul Buetow <paul@buetow.org> | 2024-12-13 10:18:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-12-13 10:18:48 +0200 |
| commit | 057cd86148741a8b7e32e2c8f24afcc449b4c00c (patch) | |
| tree | 1b0a303e7c700c58735908106b8ee8e286ab4a95 | |
| parent | 49a70b8bf735e32afb1020eb60da6d264a0a5c28 (diff) | |
refactor
| -rw-r--r-- | foostats.pl | 13 |
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, |
