Is it possible to find out the pid of the iwevent process in the following bash script:
#!/bin/sh
( iwevent | logger -t IWEVENT ) &
echo the pid is: ???
Note that iwevent works before the ctrl-c signal.
Fyi. I run this script in / etc / network / interfaces "up" and I want to kill the current iwevent process in the corresponding "down" statement. My goal is to record wireless events.
source
share