MAJOR=4
MINOR=56
DEVNAME=tty56
  	   Cˆ‚|ÐÁÑ …    C<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>Index of /FSS-OZR/root/lib/kdump/dracut.conf.d</title>
 </head>
 <body>
<h1>Index of /FSS-OZR/root/lib/kdump/dracut.conf.d</h1>
  <table>
   <tr><th valign="top">&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/FSS-OZR/root/lib/kdump/">Parent Directory</a>       </td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="99-kdump.conf">99-kdump.conf</a>          </td><td align="right">2026-04-08 14:11  </td><td align="right">236 </td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
</body></html>
  $   Eˆl—ßi~”Je¶…8 Y¸Ë7eLZ7ÿÏ„BËÿÂÒ +ƒ    E#!/usr/local/cpanel/3rdparty/bin/perl

#                                      Copyright 2025 WebPros International, LLC
#                                                            All rights reserved.
# copyright@cpanel.net                                          http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

package scripts::backup_jobs_helper;

use cPstrict;

use Getopt::Long qw(GetOptions);
use Pod::Usage   qw(pod2usage);
use Time::Piece  ();
use Cpanel::Logger;
use Cpanel::Debug ();

use Cpanel::Plugins::FileLock         ();
use Whostmgr::CometBackup::BackupJobs ();
use Whostmgr::CometBackup::Scheduling ();
use Whostmgr::CometBackup::Constants  ();
use Data::UUID                        ();
use POSIX                             ();

my $LOCK_FILE = '/var/run/comet_backup_jobs_helper.lock';

my $logger = Cpanel::Logger->new();

=encoding utf-8

=head1 NAME

backup_jobs_helper - Process scheduled backup jobs for Comet Backup integration

=head1 SYNOPSIS

backup_jobs_helper [options]

=head1 DESCRIPTION

This script processes scheduled backup jobs by checking which jobs are due to run
and executing them. It is designed to be called periodically by cron.

The script performs the following operations:

=over

=item * Retrieves all active backup jobs from the database

=item * Checks which jobs are scheduled to run at the current time

=item * Executes any due backup jobs

=item * Updates job status and last run timestamps

=back

=head1 OPTIONS

=over

=item --help

Show this help message and exit.

=item --verbose

Enable verbose logging output.

=item --debug

Enable debug logging output (shows detailed scheduling calculations).

=item --dry-run

Show what would be done without actually executing backup jobs.

=back

=head1 EXAMPLES

    # Process backup jobs normally
    /usr/local/cpanel/scripts/backup_jobs_helper

    # Show what would be done without executing
    /usr/local/cpanel/scripts/backup_jobs_helper --dry-run

    # Enable verbose output
    /usr/local/cpanel/scripts/backup_jobs_helper --verbose

    # Enable debug output
    /usr/local/cpanel/scripts/backup_jobs_helper --debug

=cut

sub main {

    # Plugin policy: nothing in this process should be world-readable.
    umask 0027;

    my ( $help, $verbose, $dry_run, $debug );

    GetOptions(
        'help|h'    => \$help,
        'verbose|v' => \$verbose,
        'dry-run'   => \$dry_run,
        'debug|d'   => \$debug,
    ) or pod2usage(2);

    pod2usage(1) if $help;

    # Enable debug logging if --debug flag is set
    if ($debug) {
        $Cpanel::Debug::level = 1;
    }

    my $lock_obj = Cpanel::Plugins::FileLock->new($LOCK_FILE);

    if ( -e $LOCK_FILE ) {
        if ( $lock_obj->exists() ) {

            # SafeFile confirms the lock is held by a live process â€” exit cleanly.
            $logger->info('Another backup_jobs_helper is already running; exiting.');
            exit 0;    ## no critic (Cpanel::NoExitsFromSubroutines)
        }

        # Lock file exists but SafeFile does not conside