File tree Expand file tree Collapse file tree
openwrt-openwisp-monitoring/files Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments