Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

init script hangs the complete system up

Tags:

linux

init

init.d

I wrote an init script to execute last that will start some pythjon script. The Python script will just run and never terminate and this makes my little linux box (getty terminal on tty) to just outpout the script but never the login prompt. I made the mistake to not assign a fix ip so i basically had to start over again (re-download the initial build onto the flash). However now I'm wondering what different possibilities I have, is it enough to launch the script in my init script with a & at the end or do I need a nohup/ What's the best way to resolve this?

Thank you! Ron

like image 967
stdcerr Avatar asked Jan 23 '26 14:01

stdcerr


1 Answers

I got this resolved by directing the output of the script to /dev/null and adding an ampersand at the end kinda like

myscript.sh > /dev/null &

this will return control to the shell and keep executing the script in the back without reporting the results to stdout.

like image 138
stdcerr Avatar answered Jan 25 '26 08:01

stdcerr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!