sous-chefs / logrotate

Development repository for the logrotate cookbook
https://supermarket.chef.io/cookbooks/logrotate
Apache License 2.0
122 stars 152 forks source link

Is Windows support feasible? #109

Open jjustice6 opened 7 years ago

jjustice6 commented 7 years ago

I see there's a Windows logrotate cookbook: https://supermarket.chef.io/cookbooks/windows_logrotate

Would it be feasible for Windows support to be included in the logrotate_app resource, or are they too far apart for that to be viable?

stevendanna commented 7 years ago

@jjustice6 Taking a /quick/ look at the examples in the README, it seems that it may be feasible given that the configuration formats look similar. I'd happily take a well-written contribution that adds windows support, but as I don't use windows regularly at all, I can't commit to supporting it myself.

rjhornsby commented 1 year ago

This is doable, and made much easier by using a powershell module that's directly compatible with logrotate's config format - https://www.powershellgallery.com/packages/Log-Rotate/1.5.4.

It's mostly a matter of getting the PS module and 7zip (for compression) installed, and then some minor setup. I won't pretend to have done it the right way because I mostly live in the linux world.