Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In case you want to react to stuff connecting to your router via ubus:

iw event | awk '/new station/ {print $4}' | xargs -n 1 sh -c 'ubus send new_station {\"mac\":\"$1\"}' _

(Yes, this contains silly hacks to work around busybox limitations)



I'm pretty sure that there already is an event emmitted upon station connection


Certainly not by default anyway. That would have been great though. Double-checked with ubus listen in case it had changed over the last couple of years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: