All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 22444f1d authored by Leigh B Stoller's avatar Leigh B Stoller

Add mysql log/backup up pruning to crontab, runs once a month.

parent 1b50c21c
#
# Add add mysql back pruning to /etc/crontab
#
use strict;
use libinstall;
use installvars;
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
;
}
#
# If something should run in the post-install phase.
#
if ($phase eq "post") {
Phase "crontab", "Updating $CRONTAB", sub {
open(FH,$CRONTAB) or return;
if (grep /backup \-c \-y/, <FH>) {
close(FH);
PhaseSkip("File has already been edited");
}
close(FH);
BackUpFileFatal($CRONTAB);
AppendToFileFatal($CRONTAB,
"15\t5\t20\t*\t*\troot\t$TBROOT/sbin/backup -c -y");
};
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment