Hello there,
I have been playing a bit with this script, and found several things that needed be changed: of course the paths, that had already been repaired by rubberfish613.
However it still didn't work on my iphone and I finally found out why: the output of the
ps instruction was cutting the lines to the width of the console, this means that the
grep instruction couldn't find the MobileMusicPlayer process and thus it couldn't kill it. For that reason the whole application didn't work properly.
The solution is simple, you can add the option
-w in the
ps instruction. In case you prefer, I have already done it for you
Good luck!!