Skip to content

Commit be929b2

Browse files
[chores] Minor fix
1 parent 441adeb commit be929b2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openwrt-openwisp-monitoring/files/monitoring.agent

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ send_data() {
138138
while true; do
139139
for file in "$TMP_DIR"/*; do
140140
if [ ! -f "$file" ]; then
141-
log -v -i "No data file found to send"
141+
log -i -v "No data file found to send"
142142
trap handle_sigusr1 USR1
143143
# SIGUSR1 signal received, interrupt sleep and continue sending data
144144
sleep "$INTERVAL" &
@@ -171,7 +171,7 @@ send_data() {
171171
# check if agent was already passing or not to avoid repeating log messages
172172
if [ "$FAILING" -eq "0" ]; then
173173
FAILING=1
174-
log -e -n "Data not sent successfully. Response code is \"$response_code\"." \
174+
[ "$VERBOSE_MODE" -ne "1" ] && log -e -n "Data not sent successfully. Response code is \"$response_code\"." \
175175
"Run with verbose mode to find more."
176176
fi
177177
break
@@ -182,7 +182,7 @@ send_data() {
182182
log -i -v "Data sent successfully"
183183
# check if agent was already failing or not to avoid repeating log messages
184184
if [ "$FAILING" -eq "1" ]; then
185-
log -i -n "Data sent successfully"
185+
[ "$VERBOSE_MODE" -ne "1" ] && log -i -n "Data sent successfully"
186186
FAILING=0
187187
[ -f "$RESPONSE_FILE" ] && rm "$RESPONSE_FILE"
188188
fi

0 commit comments

Comments
 (0)