Guest User

Untitled

a guest
Oct 26th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Start C9 IDE from systemd
  2. =========================
  3.  
  4. `/etc/systemd/system/c9.service`
  5. ```
  6. [Unit]
  7. Description=Cloud9 IDE
  8. Requires=network.target
  9.  
  10. [Service]
  11. Type=simple
  12. User=gbraad
  13. ExecStart=/home/gbraad/.local/bin/c9
  14. Restart=on-failure
  15.  
  16. [Install]
  17. WantedBy=multi-user.target
  18. ```
  19.  
  20. `/home/gbraad/.local/bin/c9`
  21. ```
  22. #!/bin/sh
  23. USERNAME=""
  24. PASSWORD=""
  25.  
  26. $HOME/.c9/node/bin/node /opt/c9sdk/server.js \
  27. --listen 0.0.0.0 \
  28. --port 8181 \
  29. -a $USERNAME:$PASSWORD \
  30. -w /workspace
  31. ```
  32.  
  33. ```
  34. $ sudo -i
  35. $ systemctl daemon-reload
  36. $ systemctl start c9
  37. $ systemctl enable c9
  38. ```
Add Comment
Please, Sign In to add comment