Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openwisp-monitoring/files/monitoring.agent
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ save_data() {
-p daemon.info
fi
# get process id of the process sending data
pid=$(pgrep -f "openwisp-monitoring.*--mode send")
kill -SIGUSR1 "$pid"
pid=$(pgrep -P 1 -f "openwisp-monitoring.*--mode send")
kill -SIGUSR1 $pid
sleep "$INTERVAL"
done
}
Expand Down Expand Up @@ -212,8 +212,8 @@ send_data() {
-t openwisp-monitoring \
-p daemon.err
# get process id of the process collecting data
pid=$(pgrep -f "openwisp-monitoring.*--mode collect")
kill -SIGKILL "$pid"
pid=$(pgrep -P 1 -f "openwisp-monitoring.*--mode collect")
kill -SIGKILL $pid
exit 2
fi
fi
Expand Down