We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 784032c commit 8f7d402Copy full SHA for 8f7d402
1 file changed
openwisp-monitoring/files/monitoring.agent
@@ -150,7 +150,14 @@ send_data() {
150
gzip -d "$file"
151
fi
152
filename="$TMP_DIR/$filename"
153
- data=$(cat "$filename")
+ # check if the data file exist
154
+ if [ -f "$filename" ] ; then
155
+ data=$(cat "$filename")
156
+ else
157
+ [ "$VERBOSE_MODE" -eq "1" ] && logger -s "data file $filename not found." \
158
+ -p daemon.info
159
+ continue
160
+ fi
161
while true; do
162
if [ "$failures" -eq "$MAX_RETRIES" ]; then
163
[ -f "$RESPONSE_FILE" ] && error_message="\"$(cat "$RESPONSE_FILE")\"" || error_message='"".'
0 commit comments