Skip to content

Commit

Permalink
Added LOGEND events
Browse files Browse the repository at this point in the history
  • Loading branch information
christianTF committed Apr 19, 2018
1 parent e11197c commit 7ec6e98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/runbackup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
my $pcfg = new Config::Simple("$lbpconfigdir/lbbackup.cfg");
if (! defined $pcfg) {
LOGCRIT "Cannot open LoxBerry Backup config file $lbpconfigdir/lbbackup.cfg";
LOGEND;
notify($lbpplugindir, "Backup", "Cannot open LoxBerry Backup config file", "error");
exit(1);
}
Expand All @@ -54,6 +55,7 @@
my $status = LoxBerry::System::lock(lockfile => 'lbbackup');
if ($status) {
LOGCRIT "LoxBerry Backup is locked. It seems that another backup is running. Exiting.";
LOGEND;
exit(1);
}
} else {
Expand All @@ -66,6 +68,7 @@
}
if ($status) {
LOGCRIT "Could not lock LoxBerry Backup after 120 tries (3 min. each) . It seems that another backup is running. Giving up.";
LOGEND;
exit (1);
}
}
Expand All @@ -83,6 +86,7 @@

if ( ! grep( /^$R::type$/, @backuptypes ) ) {
LOGCRIT "Backup type $R::type not supported";
LOGEND;
notify($lbpplugindir, "Backup", "Backup type $R::type not supported", "error");
exit (1);
}
Expand Down Expand Up @@ -212,7 +216,7 @@
}

LoxBerry::System::unlock(lockfile => 'lbbackup');

LOGEND;
exit;


Expand Down

0 comments on commit 7ec6e98

Please sign in to comment.