It will work on any linux distribution. 

Rewrote part of your script to make it work on unix platform. See readme file.