Hook Script CPERROR
Hi to avery one.
I work with Hook script that was added to event Api2::AddonDomain::addaddondomain
I used to use Cpanel::CPERROR function in my hooks modules but now I need script with escalated privileges.
In fact, I need to push Custom CPERROR to UI (page addon_domains_page_footer.html.tt or etc.)
How know how exactly works function Cpanel::CPERROR i need to reproduce it.
-
Hello, We provide a guide on using standardized hooks at: Guide to Standardized Hooks - Software Development Kit - cPanel Documentation You may also find this document helpful: Guide to Standardized Hooks - Privilege Escalation - Software Development Kit - cPanel Documentation Thank you. 0 -
Hello, We provide a guide on using standardized hooks at: Thank you.
Yes sure. I already read this article, but i did not found any info about cperrors at hook script not module !! /usr/local/cpanel/bin/manage_hooks add script ~/my-error-script.pm --category=Cpanel --event=Api2::AddonDomain::addaddondomain --stage=pre --manual --escalateprivs I know that we can create cpsession by #!/usr/local/cpanel/3rdparty/bin/perl use Cpanel; my $user="some_cp_user"; Cpanel->new->initcp($user); #or Cpanel->initcp($user); Cpanel::CPERROR{'addondomain'} = "Done"; And I have not received any error at web UI. As was mentioned earlier it works fine at my cPanel modules. Like /usr/local/cpanel/bin/manage_hooks add Cpanel::MyError0 -
I think main reason is that I can't connect exactly to active user session. 0 -
I think main reason is that I can't connect exactly to active user session.
Could you provide us with the specific steps you are taking to reproduce this issue? Also, could you provide an example of the custom script you are using? Thank you.0 -
As far as i can see i need to find out valid socket and connect to it in my perl script. /home/"cPanelUserHomeDir"/.cpanel/live-engine-connector-"SERIAL".sock 0 -
If there are any solutions for such situation ? 0 -
Hello, It looks like we are assisting you with this topic as part of ticket number 8880093. Thank you. 0
Please sign in to leave a comment.
Comments
8 comments