If you've started pd and jackd with the same user that runs this script you shouldn't have to call sudo. There is also a way to allow the user to call 'poweroff' but I forget how you set that up.. it might be a group that you have to be in.Have you tried running the script directly on your odroid to see if it outputs anything relevant?
You're calling sudo with no interaction. does sudo require a password on your odroid?