diff options
author | Antoine Beaupre <anarcat@koumbit.org> | 2009-04-17 13:09:26 -0400 |
---|---|---|
committer | Antoine Beaupre <anarcat@koumbit.org> | 2009-04-17 13:09:26 -0400 |
commit | 3c80f2328ed686b3b9565a4cced50e3e91c6af1b (patch) | |
tree | 243b7e9387ba59ee4c0f1dfc90ead2b9d42f350e | |
parent | 0c604312144f476bb35a9539e351daefb3f05a6c (diff) | |
download | puppet-backupninja-3c80f2328ed686b3b9565a4cced50e3e91c6af1b.tar.gz puppet-backupninja-3c80f2328ed686b3b9565a4cced50e3e91c6af1b.tar.bz2 |
drop the dom_sufx hack, calculate based on the parent's domain instead
-rwxr-xr-x | files/checkbackups.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/checkbackups.pl b/files/checkbackups.pl index df73ceb..5e75b85 100755 --- a/files/checkbackups.pl +++ b/files/checkbackups.pl @@ -37,8 +37,6 @@ my $STATE_DEPENDENT=4; # gross hack: we look into subdirs to find vservers my @vserver_dirs = qw{/var/lib/vservers /vservers}; -# even worse: hardcode a suffix to the vserver name to get a FQDN -my $dom_sufx = ".koumbit.net"; our $opt_d = "/backup"; our $opt_c = 48 * 60 * 60; @@ -113,6 +111,8 @@ foreach $host (@hosts) { } } continue { printf "$host\tbackups\t$state\t$message\n"; + my @dom_sufx = split(/\./, $host); + my $dom_sufx = join('.', @dom_sufx[1,-1]); foreach my $vserver (@vservers) { printf "$vserver$dom_sufx\tbackups\t$state\t$message, same as parent: $host\n"; } |