UAPI::SSL::install_ssl Hooks module/scripts
Hello, I need to install ssl vhost for nginx, after UAPI::SSL::install_ssl, but i don`t understand how to get information in script or right in module.
I`m add and register hook for UAPI::SSL::install_ssl
with module
I have all information, but haven`t root right use uapi (example uapi --user=username DomainInfo single_domain_data domain=example.com) and write to nginx config. Okey, i try use script with root right
I have root right, but i don`t know about who call this script and any information . May be i dont understand how that work ? Any help .thx. Sorry for bad English.
my $hooks = [
{
'category' => 'Cpanel',
'event' => 'UAPI::SSL::install_ssl',
'stage' => 'post',
'hook' => 'NginxSsl::install',
'exectype' => 'module',
}
with module
sub install {
my ( $context, $data ) = @_;
#_more_logging( $context, $data );
my $user = $data->{user};
my $domain = $data->{args}->{domain};
#.....
}
I have all information, but haven`t root right use uapi (example uapi --user=username DomainInfo single_domain_data domain=example.com) and write to nginx config. Okey, i try use script with root right
/usr/local/cpanel/bin/manage_hooks add script install.pl --manual --category Cpanel --event UAPI::SSL::install_ssl --stage post --exectype script --escalateprivs
I have root right, but i don`t know about who call this script and any information . May be i dont understand how that work ? Any help .thx. Sorry for bad English.
-
Hello, We document privilege escalation for hooks at: > Tweak Settings" when testing your custom application: Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage. This is documented at: 0 -
I undestand how to get data in hook script. my $user = $input->{data}->{user}; $logger->info("user: " . $user); How can I know when the AutoSsl install ssl certificates(API)? Why AutoSsl don`t use UAPI::SSL::install_ssl ? Thx. 0 -
How can I know when the AutoSsl install ssl certificates(API)? Why AutoSsl don`t use UAPI::SSL::install_ssl ? Thx.
Hello, Certificates provided through the AutoSSL feature are not installed through cPanel or the traditional SSL installation process. The following document explains how the AutoSSL feature works: Manage AutoSSL - Documentation - cPanel Documentation The following WHM API 1 function is available if you want to see when the next automatic provisioning of certificates is scheduled to run: WHM API 1 Functions - get_autossl_check_schedule - Software Development Kit - cPanel Documentation Thank you.0
Please sign in to leave a comment.
Comments
3 comments