The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    6
    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.
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  3. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  4. broncha

    broncha Active Member

    Joined:
    Feb 3, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  5. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  6. broncha

    broncha Active Member

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

Share This Page