View Single Post
Old 02-06-2016, 05:14 PM   #1174
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 726
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@teejcee

Hmm, I never thought that I would learn something about scripting by using COPS

I copied and installed your script into a debian/apache setup.

Out of the box it did not work so I "debugged" a bit.

Herewith my preliminary findings:

0 - I changed other_vhosts_access.log to access.log

1 - Using the line grep -e "200 2183" -e "200 2328" $LOGFILE > cops-log.txt didn't work for me.
a - neither 2183 nor 2328 showed up in my log file. But this was easily fixed with other (for me) matching numbers.
b - Logging into COPS with OPDS gave other numbers than logging into COPS from a browser. Did you take this into account in your script?
c - are you sure that one of these numbers isn't our old friend getJSON and double login log entries?

2 - Writing to TMPFILE did not get the desired result. I "blame" this on:
a - using another log file with a slightly different layout
b - Debian vs Mint date/time formatting (maybe?)
However even this was fixable with a lithe googling. Hey, I even learned something today!
How is the output to look like in your case? Just so I can compare.

3 - I did not (yet) use the mail functionality.

Greets

Mario
mariosipad is offline   Reply With Quote