use libudev instead of a udev rule and a script.