The question is about running a bash script in background with the ability to logout and the process to continue. The issue is that websocat and wscat don't like when I close the terminal or logout.......
**** NOTE : the script.sh does work when just do script.sh
it have the execute permission and there is no error in the script
But when I'm trying nohup, disown, bg, &, &! ===>>>> all of those don't work :(
the content of script.sh
wscat -c "wss://somewebsocketstream" > file
when I run nohup appending output to nohup.out
and when I hit enter, the script.sh stops
nohup /script.sh
when I add &
I get [1] + suspended (tty input) nohup
and .sh stops
when I add &!
whitout nohup
and only script.sh &
I get [1] + suspended (tty input)
when I type any key on the keyboard
only script.sh &!
nothing happens, I see it in top but no activity :(
when I try bg script.sh
I get bg: job not found
when I try script.sh 2>&1 &
or script.sh &> /dev/null &
I get [1] + suspended (tty input) 2>&1
nohup command &
?nohup ....sh &
I getappending output to nohup.out
and when I type enter to do something else I get[1] + suspended (tty input) nohup
suspended (tty input)
in the terminal, the process remains inactive and don't work. I have to dojobs
to get the pid and kill it manually===>>>>
). The initial paragraph could be better phrased to contain the question.