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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

next step with addon

Discussion in 'cPanel Developers' started by sime, Jul 30, 2007.

  1. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    Hi

    My goal is to execute a script in cpanel, as the same user who is logged into cpanel. I believe this is one of the simplest use-cases.

    I've been following these pages to create an addon
    http://www.cpanel.net/docs/modules/cPanel_Modules.htm
    http://www.cpanel.net/docs/cpaddons/

    I think I can create the .pm file ok, and this gives me functions I can call from html. But what and where to put a html file? I can't find that information anywhere.

    I'd like to download a simple foo.tgz which contains the total solution with install instructions. This should get me further.

    Any tips appreciated.
     
  2. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    Ugh. I keep coming across mis-information that is scaring me. Wondering if my time investment is worth it!!
    register_cpanelplugin -- this doesn't exist on my (vps) server.
    Referred to here: http://www.cpanel.net/plugins/devel/install.html

    Maybe this is cPanel 11. Will look.
     
  3. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    cPanel 11
    Better but on my ice-skates and butt-guard.

    OK. What's the difference b/t a plugin and an addon I wonder...
     
  4. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    I seem to have my bearings now.

    -- X3 theme on cPanel 11
    -- Follow this tutorial to add an icon http://www.cpanel.net/plugins/devel/install.html
    -- Then check the paths in cPanel and put your scripts there.

    That's as far as I've got anyway. I will update later for interests sake at least.
     
  5. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    #5 sime, Jul 30, 2007
    Last edited: Jul 30, 2007
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,277
    Likes Received:
    9
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I admit, this can get very confusing very fast.

    An addon script ("addon") is the old (deprecated as of version 11) version of what is now known as a WHM Plugin (version 11).

    They're now called Plugins to avoid confusion with cPAddons (which are completely different from Addons).
     
  7. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    Yes, "plugin" is a better label by far.

    Well, AFAICT, I'm trying to do something like this:
    <?cp system '/scripts/test/test.sh'; ?>'

    I'm hoping that 1) the above can run as the logged in user and 2) it doesn't require the logged in user to have any normal shell access.

    Any help appreciated. FYI, I've tried testexec.pm, but loading it is really eluding me. I look at something like doadddomain.html and I can't see how it loads the required .pm files -- at least my html file isn't greatly different...
     
  8. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,453
    Likes Received:
    12
    Trophy Points:
    148
    cPanel Access Level:
    DataCenter Provider
    Try

    <perl /usr/local/cpanel/base/frontend/x3/test.pl>
     
  9. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
    This thread is a bit windy. Starting a new one.
     
  10. sime

    sime Active Member

    Joined:
    Oct 16, 2005
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    156
Loading...

Share This Page