#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - libexec/on_boot/wordpress-squared       Copyright 2024 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

package libexec::cpanelOnboot;

use cPstrict;

use Cpanel::SafeRun::Simple ();

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

sub run (@args) {

    say "Running /scripts/sysup";
    say Cpanel::SafeRun::Simple::saferunallerrors('/scripts/sysup');

    # this is running Cpanel::CloudLinux::Pro::setup_wp2
    #   which will enable CageFS among other

    say Cpanel::SafeRun::Simple::saferunallerrors(    #
        '/usr/local/cpanel/3rdparty/bin/perl',        #
        '/usr/local/cpanel/install/WP2.pm',           #
        '--on-boot'
    );

    return 0;
}

1;
