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!

custom entries in awstats being overwritten

Discussion in 'General Discussion' started by forlinuxsupport, Feb 23, 2007.

  1. forlinuxsupport

    forlinuxsupport Well-Known Member

    Dec 22, 2004
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Can anyone help with an awstats problem I have.

    What I need to do is add some extra fileds to awstats config file for some domain. Thats easy.
    Once thats done i then run :
    /scripts/runweblogs blah
    That starts the stats running.

    As it starts it seems to edit the config file and set it back to its default !!!!!

    That seems a bit stupid so I looked at the code.
    the runweblogs seems to call this file /usr/local/cpanel/cpanellogd

    In there (line 804) I see this
    open( AWCONF, '<', '/usr/local/cpanel/etc/awstats.conf' );
        open( AWC,    '>', "${outputdir}/awstats.${domain}.conf" );
    From that It seems to take the default config file and output (over) my config file i edited.

    I cant find any error checking code to say if the file exist DONT overwrite it .. grrrr

    Does anyone know that when the stats are normally run at night, does it also set the awstats domain config file back to its default ?
    Or does it use a differnet method to run them ?

    I have just made the config file immutable, to see if that works. (its a hack and not a permanent solution)

    any help appreciated.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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