Keywords: Mode: All keywords (AND) |
Wed Dec 07, 2011 22:13
|
AlekseyCh: I'm sorry, the editing has expired ... :(
|
Wed Dec 07, 2011 22:05
|
AlekseyCh:
for ((i = 0; i < $NUMBER_OF_MODEMS; i++)); do
MODEM=${MODEMS[${i}]}
STATUS=`awk -F ',' '/'$MODEM'/ {gsub(/[[:space:]]*/, "", $2); print $2}' $STATSDIR/status`
if [ "$STATUS" = "Blocked" ]
then
eval COUNTER_${MODEMS[${i}]}=9999999;
else if [ "$STATUS" = "Unknown" ]
then
eval COUNTER_${MODEMS[${i}]}=9999999;
else if [ -z "$STATUS" ]
then
eval COUNTER_${MODEMS[${i}]}=9999999;
else
FILE="$STATSDIR/$MODEM.counter"
if [[ -e $FILE ]]
then
COUNTER=`formail -zx $MODEM: < $FILE`
if [ "$COUNTER" == "" ]
then
COUNTER=0;
fi
eval COUNTER_${MODEMS[${i}]}=$COUNTER
else
eval COUNTER_${MODEMS[${i}]}=9999999;
fi
fi
fi
fi
done
|
Wed Dec 07, 2011 21:41
|
AlekseyCh: Thank you. SMS server ry good and the right product!
Function return result from 0 to 255.
If value count is more 255 for any modem - algoritm is broken.
If value is 256 then function return is 0, and this modem is a top priority for send.
PS: Sorry for bad English. :oops:
why message_count_clear option does not work, ver. smsd 3.1.11?
additionally required to use the option message_limit?
|