Replace the script execution count tracking service.

This commit is contained in:
fs carmen
2025-07-11 18:10:04 +00:00
parent 08a537aad8
commit c30c9f9125
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -426,7 +426,7 @@ statistics_of_run-times() {
local UPDATE_OR_GET=$1
local SCRIPT=$2
if grep -q 'update' <<< "$UPDATE_OR_GET"; then
{ wget -qO- --timeout=3 "https://stat-api.netlify.app/updateStats?script=${SCRIPT}" > /tmp/statistics; }&
{ wget --no-check-certificate -qO- --timeout=3 "http://stat.cloudflare.now.cc:4000/api/updateStats?script=${SCRIPT}" > /tmp/statistics; }&
elif grep -q 'get' <<< "$UPDATE_OR_GET"; then
[ -s /tmp/statistics ] && [[ $(cat /tmp/statistics) =~ \"todayCount\":([0-9]+),\"totalCount\":([0-9]+) ]] && local TODAY="${BASH_REMATCH[1]}" && local TOTAL="${BASH_REMATCH[2]}" && rm -f /tmp/statistics
info " $(text 41) "
+1 -1
View File
@@ -262,7 +262,7 @@ statistics_of_run-times() {
local UPDATE_OR_GET=$1
local SCRIPT=$2
if grep -q 'update' <<< "$UPDATE_OR_GET"; then
{ wget -qO- --timeout=3 "https://stat-api.netlify.app/updateStats?script=${SCRIPT}" > /tmp/statistics; }&
{ wget --no-check-certificate -qO- --timeout=3 "http://stat.cloudflare.now.cc:4000/api/updateStats?script=${SCRIPT}" > /tmp/statistics; }&
elif grep -q 'get' <<< "$UPDATE_OR_GET"; then
[ -s /tmp/statistics ] && [[ $(cat /tmp/statistics) =~ \"todayCount\":([0-9]+),\"totalCount\":([0-9]+) ]] && TODAY="${BASH_REMATCH[1]}" && TOTAL="${BASH_REMATCH[2]}" && rm -f /tmp/statistics
fi