Skip to content

Commit

Permalink
improved bytes validation
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Feb 26, 2013
1 parent 5a73b73 commit 14be9aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/v-update-web-domains-traff
Expand Up @@ -43,7 +43,7 @@ for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do

# Parsing log
while read line; do
if [[ '-' != "$line" ]] && [[ 0 -lt "$line" ]]; then
if [[ "$1" =~ ^[0-9]+$ ]]; then
bytes=$(($bytes + $line))
fi
done < $log_file
Expand Down
2 changes: 1 addition & 1 deletion func/main.sh
Expand Up @@ -110,7 +110,7 @@ is_package_full() {
esac
limit=$(grep "^$1=" $USER_DATA/user.conf | cut -f 2 -d \' )
if [ "$used" -ge "$limit" ]; then
echo "Error: Limit reached / Upgrade package"
echo "Error: Limit reached / Upgrade package"
log_event "$E_LIMIT" "$EVENT"
exit $E_LIMIT
fi
Expand Down

0 comments on commit 14be9aa

Please sign in to comment.