diff --git a/CHANGELOG.md b/CHANGELOG.md index 18b0f4c..de1e9d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ cookbook-nginx CHANGELOG =============== +## 1.0.2 + + - Miguel Negrón + - [76275bf] Add pre and postun to clean the cookbook + ## 1.0.1 - Miguel Alvarez @@ -19,7 +24,7 @@ cookbook-nginx CHANGELOG - [ded1a47] Update s3.conf.erb ## 0.0.8 - - Miguel Negron + - Miguel Negrón - [717936a] lint avoid use constants for OpenSSL - [7d575d6] lint file.write instead of file.open - [fc2b48b] lint resources 2 diff --git a/packaging/rpm/cookbook-nginx.spec b/packaging/rpm/cookbook-nginx.spec index 147faca..b7cfc96 100644 --- a/packaging/rpm/cookbook-nginx.spec +++ b/packaging/rpm/cookbook-nginx.spec @@ -25,6 +25,9 @@ chmod -R 0755 %{buildroot}%{cookbook_path} install -D -m 0644 README.md %{buildroot}%{cookbook_path}/README.md %pre +if [ -d /var/chef/cookbooks/nginx ]; then + rm -rf /var/chef/cookbooks/nginx +fi %post case "$1" in @@ -38,6 +41,12 @@ case "$1" in ;; esac +%postun +# Deletes directory when uninstall the package +if [ "$1" = 0 ] && [ -d /var/chef/cookbooks/nginx ]; then + rm -rf /var/chef/cookbooks/nginx +fi + %files %defattr(0755,root,root) %{cookbook_path} @@ -47,7 +56,11 @@ esac %doc %changelog -* Fri Jan 07 2022 David Vanhoucke - 0.0.3-1 +* Thu Oct 10 2024 Miguel Negrón +- Add pre and postun + +* Fri Jan 07 2022 David Vanhoucke - change register to consul -* Tue Nov 14 2016 Juan J. Prieto - 1.0.0-1 + +* Tue Nov 14 2016 Juan J. Prieto - first spec version diff --git a/resources/metadata.rb b/resources/metadata.rb index deb91c0..d179976 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -3,4 +3,4 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures cookbook-nginx' -version '1.0.1' +version '1.0.2'