#!/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 onboot::wp2;

use cPstrict;

use Cpanel::DoOnce          ();
use Cpanel::SafeRun::Errors ();

exit( run(@ARGV) ) unless caller();

sub run (@args) {

    Cpanel::DoOnce::remove_flag('cl_pro_check_once_per_boot');

    # Enforce custom setup for WP2:
    #   queue tasks: setup_cloudlinux, setup_cagefs_mountpoints
    say "onboot::wp2 - Running install/WP2.pm";
    say scalar Cpanel::SafeRun::Errors::saferunallerrors( $^X, '/usr/local/cpanel/install/WP2.pm' );

    return 0;
}

1;
