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.

custom entries in awstats being overwritten

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

  1. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi

    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.
    Code:
    /home/blah/tmp/awstats/awstats.blahbalh.com.conf
    Once thats done i then run :
    Code:
    /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
    Code:
    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.

    Cheeers
    Andy
     
Loading...

Share This Page