This is actually the exact code we already use, but Clayton has set up a github repo for the release to make it available to distros.