2

I have a screen where the bot is launched through "node index.js". But how can I send c cmd to bash script "CTRL+C" and run again node js. In other screens, the node also works, you can’t touch it I've come to this point

screen -S testBot -X stuff  'node index.js\n'

How to kill a running node script in the screen? As I understand the PID will always be different

screen -S testBot -X stuff  'node index.js\n'
  • `screen -x` & `ctrl + c` is to easy? :D What you talking about about are "signals" which can be send via the `kill` command. But for that you need to know the process id. – Marc May 22 '23 at 18:01
  • 1
    see https://stackoverflow.com/a/16006504/900078 – pynexj May 23 '23 at 01:21

0 Answers0