Projet

Général

Profil

Révision 50234857

ID502348577ea5d3292abce02d1fcd65bf35917d61
Parent 4308f247
Enfant 64089240

Ajouté par Lars Kruse il y a environ 4 ans

Plugin dovecot: remove usage of "expr"

The usage of "expr" can be replaced easily with a shell builtin.
"expr" caused problems due to its hard-coded path.

Closes: #1240

Voir les différences:

plugins/dovecot/dovecot
30 30
######################
31 31
# Configuration
32 32
######################
33
EXPR_BIN=/usr/bin/expr
34 33
LOGFILE=${logfile:-/var/log/mail.log}
35 34
######################
36 35

  
......
75 74
######################
76 75
DISCONNECTS=$(egrep -c '[dovecot]?.*Disconnected' $LOGFILE)
77 76
CONNECTS=$(egrep -c '[dovecot]?.*Login' $LOGFILE)
78
VALUE=$($EXPR_BIN $CONNECTS - $DISCONNECTS)
77
VALUE=$(( CONNECTS - DISCONNECTS ))
79 78
if [ -z "$VALUE" ] || [ "$VALUE" -lt 0 ]; then
80 79
	VALUE=0
81 80
fi

Formats disponibles : Unified diff