Hello.
I have a script, written in Ruby, that is being ran during the "Pre" stage of PkgAccount.
I seem to be confused by the different actions that get taken, etc, during this run.
I'm wanting to add a check to this, so that if the script has an exit code of 0 then pkgacct runs as normal. Otherwise, any other error, the pkgAcct should quit/fail/whatever and exit with whatever text is sent from the script.
My "Error Text" is as follows:
This results in this script exiting with a exit code of 1. I need to figure out how to get PkgAcct to read this exit code, and fail while echoing out the abort message.
Any help here would be greatly appreciated.
I have a script, written in Ruby, that is being ran during the "Pre" stage of PkgAccount.
Code:
/usr/local/cpanel/bin/manage_hooks add script /path/to/script --manual 1 --category PkgAcct --event Create --stage pre
I'm wanting to add a check to this, so that if the script has an exit code of 0 then pkgacct runs as normal. Otherwise, any other error, the pkgAcct should quit/fail/whatever and exit with whatever text is sent from the script.
My "Error Text" is as follows:
Code:
abort("My Error Text")
Any help here would be greatly appreciated.