Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #/bin/sh
  2.  
  3. python <<'EOF'
  4. import daemon
  5. from time import sleep
  6.  
  7. print("Inizializzazione")
  8. sleep(5)
  9. print("Inizializzazione completata")
  10.  
  11. with daemon.DaemonContext():
  12.     while True:
  13.         print("Doing task 1")
  14. EOF
  15.  
  16. [ $? -eq 0 ] || exit 1
  17.  
  18. python <<'EOF'
  19. import daemon
  20. from time import sleep
  21.  
  22. print("Inizializzazione")
  23. sleep(5)
  24. print("Inizializzazione completata")
  25.  
  26. with daemon.DaemonContext():
  27.     while True:
  28.         print("Doing task 2")
  29. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement