Is it possible to know the pid of the iwevent process in the following bash script:
#!/bin/sh
( iwevent | logger -t IWEVENT ) &
echo the pid is: ???
Note that iwevent run until ctrl-c signal.
FYI. I run this script in a /etc/network/interfaces "up" statement and I want to kill the running iwevent process in the related "down" statement. My aim is to log wireless events.