w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why this Debian-Linux autostart netcat script won't autostart?

In an rc script you have root level access by default. What does "it stops at the while loop" mean? It quits after a while, or so? I guess you need to run your loop in the background in order to achieve functionality usual in autostart scripts:

echo "Starting"

( while read -r line

    #some stuff to do

done << (nc -l -p 4001) ) &

echo "Started with pid $( jobs -p )"

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.