1

i am trying to use an init.d script to execute another script in the background. The init.d script must continue immediatly after executing the other script in the background so my device can boot completely and then the executed script can do its commands. I have googled and found that the & symbol can be used at the end of the script name to execute it in the background. This worked, but my init.d script waited until the background script was finished. So i googled some more, and found that nohup command in use with & will do what i want. Perfect. HOWEVER when i used terminal emulator on android, i typed, nohup and i get "nohup: applet not found"

So as above i have no way of continuing the init.d script without it waiting for the background script. I am asking, Does anyone know how to run a script in the background while continuing the current script on android?

Or, does anybody know if i can add the "nohup" applet to my android device?

Thanks again to all who reply!

1

1 Answer 1

3

You can use daemonize to run your script:

Usage: daemonize [-f logfile] [-a] [-d delay] <program>
2
  • I love you. I never heard of such a command but i love you for helping me :) that worked PERFECTLY. exactly what i needed. You are amazing!!! THANK YOU SO MUCH!!!!
    – Seth
    Apr 6, 2012 at 16:26
  • 5
    /system/bin/sh: daemonize: not found... ?
    – trusktr
    May 10, 2014 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.