Skip to content

Commit

Permalink
Merge pull request #2 from Lijwent/fix/change-sed-no-duplicate/lijwent
Browse files Browse the repository at this point in the history
Change sed cmd to not add the line if already present
  • Loading branch information
matbgn authored Jun 1, 2023
2 parents 8ebd211 + a0dfa4d commit ce3f781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]
...

## [5.1.1] - 2023-06-01
### Fix
- Fix sed cmd to not duplicate the lines if already there for blackbox_exporter config

## [5.1.0] - 2022-11-08
### Add
- Add env file path variable to specify custom location
Expand Down Expand Up @@ -118,7 +122,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
### Removed
- [WARNING] Breaking changes for script arguments

[Unreleased]: https://github.com/matbgn/prommanager/compare/v5.1.0...HEAD
[Unreleased]: https://github.com/matbgn/prommanager/compare/v5.1.1...HEAD
[5.1.1]: https://github.com/matbgn/prommanager/compare/v5.1.0...v5.1.1
[5.1.0]: https://github.com/matbgn/prommanager/compare/v5.0.0...v5.1.0
[5.0.0]: https://github.com/matbgn/prommanager/compare/v4.1.0...v5.0.0
[4.1.0]: https://github.com/matbgn/prommanager/compare/v4.0.2...v4.1.0
Expand All @@ -129,4 +134,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
[2.0.0]: https://github.com/matbgn/prommanager/compare/v1.0.0...v2.0.0
[1.0.0]: https://github.com/matbgn/prommanager/releases/tag/v1.0.0

GH CLI: gh release create vX.0.0 -t "vX.0.0" -n "See [CHANGELOG.md](CHANGELOG.md) for details" prommanager
GH CLI: gh release create vX.0.0 -t "vX.0.0" -n "See [CHANGELOG.md](CHANGELOG.md) for details" prommanager
4 changes: 2 additions & 2 deletions prommanager
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ function download_blackbox_exporter() {
function config_blackbox_exporter() {
if [ $LOG_LEVEL -gt 3 ]; then printf "[DEBUG] Config blackbox_exporter\n"; fi
# Set ipv4 as preferred protocol for blackbox_exporter
sed -i '4i\ http:' /etc/prometheus/blackbox.yml
sed -i '5i\ preferred_ip_protocol: "ip4"' /etc/prometheus/blackbox.yml
sed -i '4s/^.*$/ http:/; 4t; 4i http:' /etc/prometheus/blackbox.yml
sed -i '5s/^.*$/ preferred_ip_protocol: "ip4"/; 5t; 5i preferred_ip_protocol: "ip4"' /etc/prometheus/blackbox.yml
}


Expand Down

0 comments on commit ce3f781

Please sign in to comment.