#                                     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 Common::Plugins::ServerInfo;

use cPstrict;
use Cpanel::Slurper ();

use constant UUID_FILE => '/var/cpanel/cpanel.uuid';

=encoding utf8

=head1 NAME

Common::Plugins::ServerInfo

=head1 DESCRIPTION

This is a common utility function to provide server-level information.


=head1 FUNCTIONS

=cut

=head2 get_server_uuid()

Reads and returns the UUID

=head3 RETURNS

The UUID of cPanel server

=cut

sub get_server_uuid {
    chomp( my $uuid = eval { Cpanel::Slurper::read(UUID_FILE) } || '' );
    return $uuid;
}

1;
