Skip to content

Commit

Permalink
Fix GeoIP lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
bviktor committed Dec 22, 2022
1 parent d9b6f04 commit 86231c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/install/tasks/steam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- "{% if ansible_os_family == 'RedHat' %}langpacks-en{% else %}language-pack-en{% endif %}"
- sudo
- rsync
- jq

- name: Create main Steam directory
file:
Expand Down
2 changes: 1 addition & 1 deletion share/killinuxfloor
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function add_bans ()

function add_geoip ()
{
GEOIP_CITY=$(curl -s "http://geoiplookup.net/ip/$(curl -s https://ipecho.net/plain)" | grep -A1 'City:' | grep -v 'City:' | sed -E 's@.*<div.*>(.*)</div>@\1@' || true)
GEOIP_CITY=$(curl -s "https://api.geoiplookup.net/?query=$(curl -s https://ipecho.net/plain)&json=true" | jq -r '.city') # stupid mcedit syntax hilight "

if [ ! -z "${GEOIP_CITY+x}" ] && [ "${#GEOIP_CITY}" -gt 0 ]
then
Expand Down

0 comments on commit 86231c1

Please sign in to comment.