Is it possible? For example the script understands if it was executed not in background and it closes and reopens in background with nohup python3 script.py &
? Can I do that with sys.argv
?
Asked
Active
Viewed 496 times
0

Allexj
- 1,375
- 6
- 14
- 29
1 Answers
0
It's possible.You can register it be a service.This site maybe be helpful:How to make a Python script run like a service or daemon in Linux

Saige Zhang
- 737
- 1
- 7
- 18
-
thanks. what's the difference between a service and a daemon? – Allexj Jul 19 '17 at 14:03
-
https://askubuntu.com/questions/192058/what-is-technical-difference-between-daemon-service-and-process – Saige Zhang Jul 20 '17 at 07:23