Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

hook /scripts/setrhash

Discussion in 'cPanel Developers' started by broncha, Aug 2, 2011.

  1. broncha

    broncha Active Member

    Joined:
    Feb 3, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Kathmandu,Nepal
    cPanel Access Level:
    Root Administrator
    Hi,

    Is there a way i can hook /scripts/setrhash??

    I need a piece of code to execute each time after this script is run, either from WHM interface or from console.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi broncha,

    At this time, there is not a hook for that. When Universal Hooks is implemented, I believe there is a hook point for that. ATM, Universal Hooks is scheduled for delivery in cPanel 11.32.

    Regards,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi broncha & all,

    It appears that we have NOT implemented a Universal Hook for scripts/setrhash.

    My apologies,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. broncha

    broncha Active Member

    Joined:
    Feb 3, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Kathmandu,Nepal
    cPanel Access Level:
    Root Administrator
    Hi DavidN,

    Is there any workaround?
    I need a piece of code to be executed when a new access hash is generated.
    Any idea if I can do that.

    Other thing, I could not even find that script in /scripts.
    Where is that script located?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The work around is to modify /usr/local/cpanel/bin/mkaccesshash. This script file will be resynced everytime cPanel is updated, so you will need to create a postupcp script hook that applies your changes to that file.

    I typically don't endorse changing core files; this is no different. However, I understand your situation and wish I had a better solution. You should consider opening a feature request thread in our Request forum and suggest adding a hook point for access hash generation.

    Best Regards,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. broncha

    broncha Active Member

    Joined:
    Feb 3, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Kathmandu,Nepal
    cPanel Access Level:
    Root Administrator
    I think that will do it.
    Thanks David. I'll give it a try tonite.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice