I’m using this.
I have made some minor tweaks to suit my setup better and also to avoid some race conditions, it works pretty well for me.
K