Guest User

Untitled

a guest
Dec 11th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. cd /home/debian/ap
  2.  
  3. # Start a virtualenv
  4. source venv-ap/bin/activate
  5.  
  6. # This needs to happen inside the virtualenv and takes ~20 seconds
  7. crossbar start
  8.  
  9. # Outside the virtualenv, perhaps in a different command line window
  10. python3 /home/debian/myscript.py
  11.  
  12. [Unit]
  13. Description=Start CB
  14. After=network.target
  15.  
  16. [Service]
  17. Type=simple
  18. User=debian
  19. ExecStartPre=source /home/debian/ap/venv-ap/bin/activate
  20. ExecStart=cd /home/debian/ap/ && crossbar start
  21. Restart=always
  22.  
  23. [Install]
  24. WantedBy=multi-user.target
Add Comment
Please, Sign In to add comment