Remove a Hook manually
given that I've been developing for a while this module, and there are hooks that are no longer relevant and weren't removed properly at the time, I'd like to clean up the hooks registry manually.
Given that I have this
How would I remove that? I keep getting this error
Thanks.
[root@whm1 ~]# /usr/local/cpanel/bin/manage_hooks list
Whostmgr:
Accounts::change_package:
id: Gu0sr_inAsLJuErsvlZh8HFi
exectype: script
weight: 100
hook: /usr/local/cpanel/whostmgr/docroot/cgi/MyApp/Model/Hook/hooks.php --changePackage
stage: post
escalateprivs: 0
--
How would I remove that? I keep getting this error
[root@whm1 ~]# /usr/local/cpanel/bin/manage_hooks delete --manual hook /usr/local/cpanel/whostmgr/docroot/cgi/MyApp/Model/Hook/hooks.php --category Whostmgr --event 'Accounts::change_package' --stage post
No matching hooks found
Thanks.
-
Hello @jimlongo, Here's the command you'd use: /usr/local/cpanel/bin/manage_hooks delete script /usr/local/cpanel/whostmgr/docroot/cgi/MyApp/Model/Hook/hooks.php --manual --category Whostmgr --event 'Accounts::change_package' --stage post
Let me know if that helps. Thank you.0 -
Thanks Michael, but I still get the same result. No matching hooks found 0 -
Hello @jimlongo, It looks like the command in the hook you are attempting to delete uses a flag, so you'd need to use a command like this to delete it: /usr/local/cpanel/bin/manage_hooks delete script "/usr/local/cpanel/whostmgr/docroot/cgi/MyApp/Model/Hook/hooks.php --changePackage" --manual --category Whostmgr --event 'Accounts::change_package' --stage post
Thank you.0
Please sign in to leave a comment.
Comments
3 comments