Disabling Awstats does not remove awstats-icon links

Small, but still a bug: disabling Awstats should remove all the traces, like the following awstats-icon link files in the respective virtual server's home directory:

lrwxrwxrwx  1 username username    4 Oct 10 17:44 awstats-icon -> icon
lrwxrwxrwx  1 username username    4 Oct 10 17:44 awstatsicons -> icon
drwxr-xr-x  9 username username 4096 Oct 10 00:56 icon

but, unfortunately, it does not.

Status: 
Active

Comments

That's odd, because the code exists to remove those files.

Are they in the domain's home directory, or the public_html dir? Because the latter is what Virtualmin expects (and creates)

They are left in the public_html directory. I wonder why you always keep asking additional questions when it is so easy just to try it on your end?!

@yngens - I asked because in the bug you said "virtual server's home directory" , which is not the usual location.

Never mind, I found the cause of this - it will be fixed in the next AWstats plugin release.

Status: Fixed » Closed (fixed)

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

Unfortunately, this was either never fixed or the problem came back. To reproduce the issue just enable and disable Awstats, and then see the following directories and files are left behind uncleaned:

/home/username/awstats
/home/username/public_html/awstats-icon -> icon
/home/username/public_html/awstatsicons -> icon
/home/username/public_html/icon
Status: Closed (fixed) » Active

Forgot to change the issue status. If you really fixed it, then please make sure it won't come back.

I can confirm this is happening on Ubuntu Linux 18.04.1 with Webmin 1.930, Usermin 1.780 and Virtualmin 6.07.

Guys, this bug still exist, and i have also a lot of folder/files in /home/user/awstats.

to be honest, it takes lot of space and i really don't need history of2..3 years ago, right?

I tried, in virtualserver untick AWstats reporting, tick/untick nothing removed...

report:

Deleting old data files in /home/user/awstats

Now updating the report for domain.com from log file /var/log/virtualmin/domain.com_access_log ..

Create/Update database for config "/etc/awstats/awstats.domain.com.conf" by AWStats version 7.8 (build 20200416) From data in log file "/var/log/virtualmin/domain.com_access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Jumped lines in file: 0 Parsed lines in file: 6346 Found 0 dropped records, Found 0 comments, Found 1 blank records, Found 11 corrupted records, Found 0 old records, Found 6334 new qualified records.

Please fix.

Virtualmin v6.13 PRO Usermin 1.8.10 Webmin 1.960

FOUND IT: log file /var/log/virtualmin/domain.com_access_log is not emptied, therefor stats are just renewed....

The original logs should be periodically cleared. Do you have log rotation enabled for this domain? You can check by looking for a entry in /etc/logrotate.conf

Hi, Yes, i can confirm the domain is in /etc/logrotate.d/virtualmin.conf

but not in the file: /etc/logrotate.conf

Looking in menu: Log File Rotation, these files are booked for weekly rotation...

Weekly  systemctl reload httpd.service ; sleep 5