fix: geoip standalone script should check on CONTAINER_ENGINE variable first#3982
fix: geoip standalone script should check on CONTAINER_ENGINE variable first#3982
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3982 +/- ##
=======================================
Coverage 99.49% 99.49%
=======================================
Files 3 3
Lines 197 197
=======================================
Hits 196 196
Misses 1 1 ☔ View full report in Codecov by Sentry. |
aminvakil
left a comment
There was a problem hiding this comment.
I'd suggest adding this after echo "${_group}Setting up GeoIP integration ..." line.
Also geoip.sh may get called from any other directory or using a systemd service, ... .
It's better to check for _detect-container-engine.sh next to script_dir directory.
With a command like this:
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
The plan is to make /path/to/install/geoip.sh and ./geoip.sh source _detect-container-engine.sh and make it work.
@aminvakil I was initially thinking to make a separate bash script rather than to tell users to use geoip.sh directly. So they would execute "./scripts/update-geoip.sh" What do you think? |
If users were using |
aminvakil
left a comment
There was a problem hiding this comment.
script_dir is where script directory is.
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Closes #3953