I am trying to keep a python script running on my server after I close my ssh client connection. Normally I use
sudo supervise . >output.log 2>err.log < /dev/null &
but now on a new server its not working. It works fine when i start it first and still connected but the second I close my connection supervise stops. This is my run file, and I've tripled checked its in the correct directory:
#!/bin/bash
sudo python3 Server.py
Any help is greatly appreciated!
For such task I use screen
, that creates virtual terminals that can be safely detached.
You can find brief tutorial here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.