Projet

Général

Profil

Révision 8cf82404

ID8cf82404ac51170602b95105a0fe9597819cb00c
Parent 4a7a0de1
Enfant 22c41cd6

Ajouté par Tom Hendrikx il y a environ 12 ans

Minor fixes for dspam_ plugin

Voir les différences:

plugins/dspam/dspam_
234 234

  
235 235
	debug starting $dspam_stats -t -S
236 236
	local t_start=$(date +%s)
237
	$dspam_stats -t -S | while read a b c d e f g h i j k l x; do
237
	$dspam_stats -t -S | while read a b c d e f g h i j k l m x; do
238 238

  
239 239
		# example of output format (3.9.1 rc1) for each user:
240 240
		#username@example.org
241 241
		#    TP:     0 TN:  2147 FP:     0 FN:    53 SC:     0 NC:     0
242 242
		#    SHR:    0.00%       HSR:    0.00%       OCA:   97.59%
243 243

  
244
		# or for short user names:
245
		#vmail    TP:  1141 TN:   459 FP:     0 FN:     5 SC:     0 NC:     0
246
		#         SHR:   99.56%       HSR:    0.00%       OCA:   99.69%
247

  
244 248
		case $a in
245 249
			TP:)
246 250
				# the 2nd line
......
262 266
			*)
263 267
				# the 1st line
264 268
				local uid=$a
269
				# data from 2nd line is also here
270
                                [ "$b" = "TP:" ] && local tp=$c tn=$e fp=$g fn=$i sc=$k nc=$m
265 271
				;;
266 272
		esac
267 273
	done
......
495 501
			if [ -n "$pattern" ]; then
496 502
				debug env.pattern was set, so use it: $pattern
497 503
				continue
498
			elif [ $target == "ALL" ]; then
504
			elif [ $target = "ALL" ]; then
499 505
				local pattern="-v TOTAL"
500 506
				debug target=ALL: need pattern for all users, but not for TOTAL: $pattern
501 507
			else

Formats disponibles : Unified diff