Hi,
As I know you can't execute any commands or shell-script on the iOS from you application on official devices. Because security policy doesn't allowing you to do this. Application can't work with any datas not from application folder. If you need something to be execute you can try to copy shell script into application folder and then execute it.
Also I recommend you read Apple documentation about certificate and how it works on iOS platform. In general, when you build your app and install it to official devices your application must be subscribe using special certificate which you need to receive from Apple (Apple iOS Developer program). If your application will not be subscribe with this certificate other people can't install your application and your application not be approve in App Store.
Other link:
App Store Review Guidelines
P.S. From your post I understand you are using jailbreak device, right? If so I recommend to you don't use it. Because on the official device it couldn't work.
P.S.S. iOS and OS X application can't execute any third-part processes and script. Because certificate will block all third-part calls. But if you don't need to post you app to App Store you could skip Code sign of your app (I've use it only on OS X, on iOS you need special certificate).