Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    4

    Default Detect easyapache running

    Hi,

    I create a shell script, but this script can not execute when easyapache running.

    With a simple "ps aux | grep easyapache" is not 100% functional, it seems that easyapache executes several other commands.

    Have any way to find if the easypache is running without the "ps aux | grep easyapache"? Like A PID, lock file, etc.

    Thanks!

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Detect easyapache running

    When EasyApache is running, this file will exist:

    /usr/local/apache/AN_EASYAPACHE_BUILD_IS_CURRENTLY_RUNNING

    Your script could simply check for the existence of that file.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Registered User
    Join Date
    Aug 2011
    Posts
    4

    Default Re: Detect easyapache running

    Thanks for answer cPanelTristan.

    I run a command /scripts/easyapache --build , but a file AN_EASYAPACHE_BUILD_IS_CURRENTLY_RUNNING has created ~3 minutes later.

    Have any way to find if the easypache is running, since the beginning to the end of execution?

    WHM 11.30.2 (build 1)

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Detect easyapache running

    The build isn't considered to be running until that file has been created. This is the only way I know to check for EasyApache running. Put a time delay in your script if necessary to do a recheck after 5 minutes otherwise.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Registered User
    Join Date
    Aug 2011
    Posts
    4

    Default Re: Detect easyapache running

    My script is running in 20 to 20 seconds, if i increase delay, i'm end the usefulness of the script. When i apply /scripts/easyapache --build, apparently all process of apache is down, because "ps aux | grep httpd" returning nothing, thus activating my script.

    Anyway, thanks for explanation.

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Detect easyapache running

    What is your script doing exactly? It is restarting Apache when it is down, which many other scripts accomplish including chkservd if you monitor Apache in it?
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Registered User
    Join Date
    Aug 2011
    Posts
    4

    Default Re: Detect easyapache running

    Is one of the features of the script, unfortunately this is one feature that i can talk, but the purpose is to keep apache on.

    I do not know the chkservd yet.

    Thanks.

Similar Threads & Tags
Similar threads

  1. Backup before running EasyApache?
    By TitanJeff in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-14-2011, 03:05 PM
  2. running upcp or easyapache is taking ages
    By manokiss in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 02-10-2009, 09:13 PM
  3. Emergency - Server crashes when running easyapache
    By noimad1 in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 12-26-2007, 09:30 AM
  4. Problems running easyapache
    By dandanfireman in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-27-2007, 01:39 PM
  5. Issues after running easyapache
    By rhood in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-12-2003, 09:51 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube