-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> - 0.0.3-1 | ||
* Thu Oct 10 2024 Miguel Negrón <[email protected]> | ||
- Add pre and postun | ||
|
||
* Fri Jan 07 2022 David Vanhoucke <[email protected]> | ||
- change register to consul | ||
* Tue Nov 14 2016 Juan J. Prieto <[email protected]> - 1.0.0-1 | ||
|
||
* Tue Nov 14 2016 Juan J. Prieto <[email protected]> | ||
- first spec version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
maintainer_email '[email protected]' | ||
license 'AGPL-3.0' | ||
description 'Installs/Configures cookbook-nginx' | ||
version '1.0.1' | ||
version '1.0.2' |