phlipper / chef-monit

Chef cookbook for monit package
http://phlippers.net/chef-monit
MIT License
67 stars 69 forks source link

Fix converge error caused by overwriting runnig bin file #70

Closed fulloflilies closed 9 years ago

fulloflilies commented 9 years ago

This PR fixes problem happens during second and further converge, trying to overwrite monit binary file while the file is already opened and not writable.

The binary install recipe now detects following 3 cases and behaves differently: case 1) Binary file not found the recipe download binary and installs it case 2) Binary file found and different version need to be installed the recipe delete the binary file as there is case it's running and not writable, and download and installs new one case 3) Binary file found and same version as the one to be installed skips download and installation

phlipper commented 9 years ago

@fulloflilies thank you very much for this! I have fixed up the test failures and merged this in as #71.