When disabling "log rotate" from the Virtualmin control panel (and via API) for a domain via
Edit Virtual Server, then re-enabling it, Virtualmin spits back the error
Log file rotation failed! : .. the log file /var/log/virtualmin/mydomain.com_access_log is already being rotated at ../web-lib-funcs.pl line 1427
It would appear Webmin is having troubles
deleting the logrotate configuration for the domain upon
disabling it via the admin or API.
*** As a temporary workaround, I simply delete the configuration file from
/etc/logrotate.d folder for the given domain. This allows Webmin to properly re-create the configuration file and flag the feature as enabled inside Virtualmin. ***