aboutsummaryrefslogtreecommitdiffstats
path: root/cron/counter.sh
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-05-22 20:38:22 +0200
committerJoe <bousset.rudy@gmail.com>2022-05-22 20:38:22 +0200
commitef70996a6bdeb400a39506a98e713bbcdfcc83d2 (patch)
tree87ff3371146d60dee71b4d13d94874680780341f /cron/counter.sh
parentupdate (diff)
downloadjoe-scripts-ef70996a6bdeb400a39506a98e713bbcdfcc83d2.tar.gz
joe-scripts-ef70996a6bdeb400a39506a98e713bbcdfcc83d2.tar.bz2
joe-scripts-ef70996a6bdeb400a39506a98e713bbcdfcc83d2.tar.xz
joe-scripts-ef70996a6bdeb400a39506a98e713bbcdfcc83d2.tar.zst
joe-scripts-ef70996a6bdeb400a39506a98e713bbcdfcc83d2.zip
Removed bots check for its too heavyHEADmaster
Diffstat (limited to 'cron/counter.sh')
-rwxr-xr-xcron/counter.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/cron/counter.sh b/cron/counter.sh
index b75dd12..b93b8ab 100755
--- a/cron/counter.sh
+++ b/cron/counter.sh
@@ -3,8 +3,9 @@
logfile='/var/log/nginx/access.log'
destfile='/usr/local/www/jozan/index.html'
foretext='Unique visitors: '
-botlist='petalbot|googlebot|adsbot-google|ahrefs\.com|pingbot|robots\.txt|pandalytics|serpstatbot|zoombot|semrush.com\/bot|archive\.org_bot|bingbot|vuhuvbot|neevabot|botaflatoon|botfnetowrksx|zaldamosearchbot|facebookexternalhit|mj12bot|polaris botnet|turnitinbot'
+#botlist='petalbot|googlebot|adsbot-google|ahrefs\.com|pingbot|robots\.txt|pandalytics|serpstatbot|zoombot|semrush.com\/bot|archive\.org_bot|bingbot|vuhuvbot|neevabot|botaflatoon|botfnetowrksx|zaldamosearchbot|facebookexternalhit|mj12bot|polaris botnet|turnitinbot'
[ -e $logfile ] || exit 1
[ -e $destfile ] || exit 1
-sed -i '' "s/$foretext.*$/$foretext<b>$(grep -E -v -i "$botlist" $logfile | awk '{print $1}' | sort | uniq | wc -l | tr -d ' ')<\/b>/" $destfile
+# sed -i '' "s/$foretext.*$/$foretext<b>$(grep -E -v -i "$botlist" $logfile | awk '{print $1}' | sort | uniq | wc -l | tr -d ' ')<\/b>/" $destfile
+sed -i '' "s/$foretext.*$/$foretext<b>$(awk '{print $1}' $logfile | sort | uniq | wc -l | tr -d ' ')<\/b>/" $destfile