-
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.
Add pre and postun to clean the cookbook
- Loading branch information
Showing
1 changed file
with
19 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ chmod -R 0755 %{buildroot}%{cookbook_path} | |
install -D -m 0644 README.md %{buildroot}%{cookbook_path}/README.md | ||
|
||
%pre | ||
if [ -d /var/chef/cookbooks/logstash ]; then | ||
rm -rf /var/chef/cookbooks/logstash | ||
fi | ||
|
||
%post | ||
case "$1" in | ||
|
@@ -40,6 +43,12 @@ case "$1" in | |
esac | ||
mkdir -p /share/logstash-rules | ||
|
||
%postun | ||
# Deletes directory when uninstall the package | ||
if [ "$1" = 0 ] && [ -d /var/chef/cookbooks/logstash ]; then | ||
rm -rf /var/chef/cookbooks/logstash | ||
fi | ||
|
||
%files | ||
%defattr(0755,root,root) | ||
%{cookbook_path} | ||
|
@@ -49,23 +58,26 @@ mkdir -p /share/logstash-rules | |
%doc | ||
|
||
%changelog | ||
* Fri Jan 19 2023 David Vanhoucke <[email protected]> - 2.0.1-1 | ||
* Thu Oct 10 2024 Miguel Negrón <[email protected]> | ||
- Add pre and postun | ||
|
||
* Fri Jan 19 2023 David Vanhoucke <[email protected]> | ||
- Add apstate pipeline | ||
|
||
* Fri Sep 22 2023 Miguel Negrón <[email protected]> - 2.0.0-1 | ||
* Fri Sep 22 2023 Miguel Negrón <[email protected]> | ||
- Remove social | ||
|
||
* Tue Apr 18 2023 Luis J. Blanco <[email protected]> - 1.0.21-1 | ||
* Tue Apr 18 2023 Luis J. Blanco <[email protected]> | ||
- Monitor pipeline | ||
|
||
* Wed Nov 17 2021 Javier Rodriguez <[email protected]> - 1.0.3-1 | ||
* Wed Nov 17 2021 Javier Rodriguez <[email protected]> | ||
- Vault pipeline enrichment | ||
|
||
* Fri Oct 22 2021 Javier Rodriguez <[email protected]> - 1.0.2-1 | ||
* Fri Oct 22 2021 Javier Rodriguez <[email protected]> | ||
- Netflow pipeline enrichment | ||
|
||
* Tue Oct 19 2021 Javier Rodriguez <[email protected]> - 1.0.1-1 | ||
* Tue Oct 19 2021 Javier Rodriguez <[email protected]> | ||
- Sflow pipeline enrichment | ||
|
||
* Thu Jan 25 2018 Juan J. Prieto <[email protected]> - 1.0.0-1 | ||
* Thu Jan 25 2018 Juan J. Prieto <[email protected]> | ||
- first spec version |