Current time: 05-19-2024, 08:59 AM Hello There, Guest! (LoginRegister)


Post Reply 
trunk (post rc4, pre rc5) problems (bad parts templates?)
Author Message
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #5
RE: trunk (post rc4, pre rc5) problems (bad parts templates?)
Ok, I have found the error (I think).

In static mode, awstats should put statistics in {APACHE_WWW_DIR}/{DMN_DIR}/statistics

The template /etc/ispcp/cron.d/parts/dmn_awstats_entry.tpl is correct:
Code:
{MINUTE} {HOUR}  * * *   root perl {AWSTATS_ROOT_DIR}/awstats_buildstaticpages.pl -config={DMN_NAME} -update -lang={USER_LANG} -awstatsprog={AWSTATS_ENGINE_DIR}/awstats.pl -dir={APACHE_WWW_DIR}/{DMN_NAME}/statistics/ >/dev/null 2>&1

The problem is in ispcp-dmn-mngr in dmn_add_awstats_cron().

This function loads AWSTATS_WWW_DIR (which is not defined in ispcp.conf) instead of AWSTATS_WEB_DIR.

Since this is confusing (APACHE_WWW_DIR vs AWSTATS_WEB_DIR in ispcp.conf) and WWW_DIR for APACHE_WWW_DIR, APACHE_WWW_DIR for AWSTATS_WWW|WEB_DIR etc in ispcp-dmn-mngr, I think a dev should get this stuff right.

For testing, I changed the tag_hash table as follows:
Code:
my %tag_hash = (
                    '{DMN_NAME}' => $dmn_name,
                    '{MINUTE}' => $cronjob_minute,
                    '{HOUR}' => $cronjob_hour,
                    '{AWSTATS_ROOT_DIR}' => $awstats_root_dir,
                    '{AWSTATS_ENGINE_DIR}' => $awstats_engine_dir,
                    '{APACHE_WWW_DIR}' => $main::cfg{'APACHE_WWW_DIR'},
                    '{USER_LANG}' => $user_lang
                   );
And got my test domain to be created properly... but I'm not sure if I have introduced other problems (perhaps with dynamic awstats).

If someone knows how to open a ticket... pls. do so (as I'm a little tired tonight).

ispcomm.
(This post was last modified: 05-03-2008 07:44 AM by ispcomm.)
05-03-2008 07:42 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: trunk (post rc4, pre rc5) problems (bad parts templates?) - ispcomm - 05-03-2008 07:42 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)