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!

easyapache post-script ?

Discussion in 'EasyApache' started by consultorpc, Aug 31, 2010.

  1. consultorpc

    consultorpc Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    Is there any way to exec a script after exec easyapache ?

    TIA.
     
  2. cPanelJared

    cPanelJared Technical Analyst

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    21
    Trophy Points:
    143
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Script hook

    This is available via an EasyApache script hook. The following section of our documentation explains how to do this:

    EasyApacheHooks < EasyApache3 < TWiki

    For a complete list of the script hooks available in the rest of cPanel, not only EasyApache, please see the following:

    cPanel/WHM Script Hooks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. consultorpc

    consultorpc Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    I've created the posteasyapache script with the proper permissions:

    Code:
    # ls -lh /scripts/posteasyapache 
    -rwxr-xr-x  1 root root 107 Aug 31 19:08 /scripts/posteasyapache*
    My script looks like this:

    Code:
    #!/bin/bash
    
    chown nobody:nobody /usr/local/apache/htdocs/index.php
    rm /usr/local/apache/htdocs/index.html
    
    I tried to run easyapache but it looks like the script wasn't run as the owners of index.php, for example, were still root:root.

    Am i doing something wrong?
     
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