Just a guess: The problem is probably not in the script. It's the fact the script does not get installed.