Remove /etc/cron.hourly/awstats and /etc/cron.daily/00webalizer files during Virtualmin installation

CentOS creates two files /etc/cron.hourly/awstats and /etc/cron.daily/00webalizer before Virtualmin is installed. Should they be automatically removed by Virtuamin installation script as AFAIK Virtualmin has its own way of dealing with those two stats programs or Virtualmin interacts with those two cron tasks and they should be kept in tact? In particular, does Virtualmin schedule any cron jobs for Webaliazer and Awstats when they are enabled by Virtualmin users?

Status: 
Closed (fixed)

Comments

Howdy -- during installation, two things should happen.

One, the contents of the awstats file you're referring to should be commented out.

Two, there's a file located in /etc/sysconfig/webalizer -- it has a line in it that looks like this:

WEBALIZER_CRON=yes

During installation, that should be commented out.

Each of the above two steps should prevent those cron jobs from being executed.

The problem with just deleting the cron jobs, is that when the packages are updated, the cron jobs will be reinstalled. Instead, those are left in place, and they are simply disabled.

Are those disabled (ie, commented out as described above) in your case?

Also, note that the scheduling Virtualmin performs can be seen within root's crontab. One way to see that is to run "crontab -l" as the root user. That should contain commands Virtualmin adds for handling each domain's webalizer and awstats updates, amongst other things.

Joe's picture
Submitted by Joe on Sun, 10/01/2017 - 16:42 Pro Licensee

It looks like there's a regression for AWStats on CentOS/RHEL, so it isn't being commented out as it should, but Webalizer is definitely being handled correctly (I checked on my test system).

AWstats fix has been checked in and will roll out with the next version of virtualmin-config package.

Thanks for the heads up!

Joe's picture
Submitted by Joe on Sun, 10/01/2017 - 16:56 Pro Licensee

Assigned: Unassigned »
Status: Active » Fixed
The problem with just deleting the cron jobs, is that when the packages are updated, the cron jobs will be reinstalled. Instead, those are left in place, and they are simply disabled.

Got your point.

One, the contents of the awstats file you're referring to should be commented out. Are those disabled (ie, commented out as described above) in your case?

Unfortunately, nothing in /etc/cron.hourly/awstats is commented out.

It looks like there's a regression for AWStats on CentOS/RHEL, so it isn't being commented out as it should, but Webalizer is definitely being handled correctly (I checked on my test system). AWstats fix has been checked in and will roll out with the next version of virtualmin-config package.

Thanks for taking care of this as we are striving to get the perfect Virtualmin setup, so nothing - even this kind of minor that eat resources regardless - things should be neglected.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.