Skip to content

Commit

Permalink
update centmin.sh runs in 124.00stable
Browse files Browse the repository at this point in the history
- speed up centmin.sh menu runs by reducing geoip check call to a single call
  • Loading branch information
centminmod committed Jun 30, 2022
1 parent 4b53ce6 commit 81e2100
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion centmin-cli.sh
Expand Up @@ -27,7 +27,7 @@ DT=$(date +"%d%m%y-%H%M%S")
branchname='124.00stable'
SCRIPT_MAJORVER='124'
SCRIPT_MINORVER='00'
SCRIPT_INCREMENTVER='33'
SCRIPT_INCREMENTVER='34'
SCRIPT_VERSIONSHORT="${branchname}"
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.s${SCRIPT_INCREMENTVER}"
SCRIPT_DATE='08/05/22'
Expand Down
2 changes: 1 addition & 1 deletion centmin.sh
Expand Up @@ -27,7 +27,7 @@ DT=$(date +"%d%m%y-%H%M%S")
branchname='124.00stable'
SCRIPT_MAJORVER='124'
SCRIPT_MINORVER='00'
SCRIPT_INCREMENTVER='33'
SCRIPT_INCREMENTVER='34'
SCRIPT_VERSIONSHORT="${branchname}"
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.s${SCRIPT_INCREMENTVER}"
SCRIPT_DATE='08/05/22'
Expand Down
5 changes: 3 additions & 2 deletions inc/cpcheck.inc
Expand Up @@ -749,7 +749,8 @@ march_hostcheck() {
# cpu models to prevent issues when you switch host nodes with differing
# cpu models causing seg faults for nginx and php-fpm
# VPS_ASNCHECK=$(curl -${ipv_forceopt}s${CURL_TIMEOUTS} https://ipinfo.io/org)
VPS_ASNCHECK=$(curl -${ipv_forceopt}s${CURL_TIMEOUTS} https://geoip.centminmod.com/v3 | jq -r '"\(.data.asn) \(.data.description_short)"')
VPS_GEOIPCHECK=$(curl -${ipv_forceopt}s${CURL_TIMEOUTS} https://geoip.centminmod.com/v3 | jq -r)
VPS_ASNCHECK=$(echo "$VPS_GEOIPCHECK" | jq -r '"\(.data.asn) \(.data.description_short)"')
if [[ "$(echo "${VPS_ASNCHECK}" | egrep -i -o 'upcloud|linode|digitalocean|vultr|choopa|hetzner|frantech|hostus|ramnode|amazon|google|microsoft|mammoth|contabo|netcup')" && "$MARCH_TARGETNATIVE_ALWAYS" != [yY] ]]; then
MARCH_TARGETNATIVE='n'
NGX_GSPLITDWARF='n'
Expand Down Expand Up @@ -2298,7 +2299,7 @@ pureftpdupdates() {
if [ "$SECOND_IP" ]; then
CNIP="$SECOND_IP"
else
CNIP=$(curl -${ipv_forceopt}s${CURL_TIMEOUTS} https://geoip.centminmod.com/v3 | jq -r '.ip')
CNIP=$(echo "${VPS_ASNCHECK}" | jq -r '.ip')
fi
# disable anonymous logins by default
CHECKPFTPD_ANON=$(grep 'NoAnonymous no' /etc/pure-ftpd/pure-ftpd.conf)
Expand Down

0 comments on commit 81e2100

Please sign in to comment.