Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #257 from grm34/dev
Browse files Browse the repository at this point in the history
Adds secure HTTPS connection for ipinfo API
  • Loading branch information
grm34 authored May 12, 2020
2 parents ed0ee67 + 6329c42 commit ecfcac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/arch/mirrorlist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _mirrorlist() {

### Get user country code from ipinfo.io API
_info "${MSG_GET_MIRRORS}"
CODE=$( curl -s ipinfo.io/country?token=${TOKEN} )
CODE=$( curl -s https://ipinfo.io/country?token=${TOKEN} )
CHECK_COUNTRY_CODE=$( echo "${COUNTRY}" | grep "error" )

### Update mirrorlist if country code properly detected
Expand Down Expand Up @@ -52,7 +52,7 @@ _timezone() {

### Get user timezone from ipinfo.io API
_info "${MSG_GET_TIMEZONE}"
TIMEZONE=$( curl -s ipinfo.io/timezone?token=${TOKEN} )
TIMEZONE=$( curl -s https://ipinfo.io/timezone?token=${TOKEN} )

### Update timezone if properly detected
if grep -Fxq "${TIMEZONE}" ./timezone; then
Expand All @@ -75,7 +75,7 @@ _clock() {
_check timedatectl set-timezone "${TIMEZONE}"

# Ensure UDP 123 is open
GET_IP=$( curl -s ipinfo.io/ip?token=${TOKEN} )
GET_IP=$( curl -s https://ipinfo.io/ip?token=${TOKEN} )
CHECK_IP=$( echo "${GET_IP}" | grep "error" )

if [[ ! ${CHECK_IP} ]]; then
Expand Down

0 comments on commit ecfcac7

Please sign in to comment.