Koozali.org: home of the SME Server

error message every two hours after installation of awstats qmail

Offline cirkit

  • ****
  • 73
  • +0/-0
I am a linux newbie an am experimenting with sme server 7.3. i ahve a server installated with several users and domains all runing fine. lately i wanteded to explore some contribs so i installaed awstats for qmail, the contrib is working fine. the last command mentioned in the instructions while installing awstats is to perform a manual update. since then i am getting this message on my admin account every two hours. what does this message mean and how can it be disabled.

subject of message: Cron <root@mcp61> /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mail >/dev/nu

message: /bin/ls: /var/log/qmail/*.s: No such file or directory
/bin/basename: too few arguments
Try `/bin/basename --help' for more information.





The procedure i used to install awstats is as follows

Installation

Download the RPM from the AWstats homepage
wget http://prdownloads.sourceforge.net/awstats/awstats-6.7-1.noarch.rpm

Install the RPM
/usr/bin/yum -y localinstall awstats-6.7-1.noarch.rpm

Note: 
If you have the AWStats contrib installed, use this install command
rpm -ivh --force awstats-6.7-1.noarch.rpm
 

Setup
Download the setup script qmail-awstats-setup.sh and run it.

wget http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/Qmail-AWStats/qmail-awstats-setup.sh
bash qmail-awstats-setup.sh
This script...

creates an AWStats config file for Qmail
creates a data directory for AWStats
installs a logfile preprocessor script
creates a custom template for httpd.conf
creates a custom template for crontab

Run the first update manually

/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mail

Usage
Point your browser to https://YOUR_SMESERVER_IP/awstats/awstats.pl?config=mail and login as admin.



I believe the message i get is due to the last command i issued
how do i solve this problem?

cirkit

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: error message every two hours after installation of awstats qmail
« Reply #1 on: July 11, 2008, 08:59:38 AM »
This seems like the install instructions from the wiki, next time please just post the link, no need to reproduce it's content here.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #2 on: July 11, 2008, 10:02:00 AM »
I'll try to post the way you suggest. Any solution to the above problem?

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #3 on: July 11, 2008, 10:03:30 AM »
How do i remove awstats from the command line, i tried a few commands but unsucessful.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: error message every two hours after installation of awstats qmail
« Reply #4 on: July 11, 2008, 10:08:52 AM »
How do i remove awstats from the command line, i tried a few commands but unsucessful.
The problem with this howto is that stuff is automated by scripts, you will have to study the contents of the scripts in order to know how to revert it.

To remove the awstats package itself you should be find doing this (considering you installed using yum):
Code: [Select]
yum remove awstats
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #5 on: July 11, 2008, 10:17:13 AM »
i have posted the script file and cronjob file here http://jst.net.in/scpfiles

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #6 on: July 11, 2008, 10:19:48 AM »
I tried going through the scripts but could not understand much. only the last few lines point towards the error i have listed.

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #7 on: July 11, 2008, 10:20:44 AM »
if i remove awstats using yum. what happens to the script and cron job?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: error message every two hours after installation of awstats qmail
« Reply #8 on: July 11, 2008, 11:03:08 AM »
if i remove awstats using yum. what happens to the script and cron job?
They will stay unless you remoe them yourself.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline compdoc

  • *
  • 226
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #9 on: July 15, 2008, 04:35:40 AM »
sounds like you dont have any /var/log/qmail/*.s files. These are logs that are closed when they reach a certain size. When the log named current gets to about 5 megs, its named something like @4000000048701a220ed3fb7c.s and is not used anymore. (except for stats)

You can see samples of them in other log directories in /var/log/ if you poke around, but if its a new server and its not actually processing mail, you might not see any..

That link you posted for the script and cronjob doesnt work, btw.

Also, dont just type in 'yum remove awstats' unless awstats was the actual name of the package you installed. I use the awstats for my website, and its great...

You might get this to work if you modify the script to include the file named current. There shouldnt be file-lock concerns since not a busy system, but you probably shouldnt do it on a production server.

Offline cirkit

  • ****
  • 73
  • +0/-0
Re: error message every two hours after installation of awstats qmail
« Reply #10 on: July 15, 2008, 10:05:43 AM »
I'll check for the log files you mentioned. Actually my server crashed two days ago, its up again and the script and cron job files can be viewed http://jst.net.in/scpfiles
thankx