You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
446 B

  1. #!/bin/sh /etc/rc.common
  2. START=99
  3. HOME=/root
  4. MOZIOT_HOME="${HOME}/.mozilla-iot"
  5. export PATH="/opt/mozilla-iot/gateway/tools:${PATH}"
  6. run_app() {
  7. cd /opt/mozilla-iot/gateway
  8. echo "node version"
  9. node --version
  10. echo "npm version"
  11. npm --version
  12. echo "Starting gateway ..."
  13. npm start
  14. }
  15. start()
  16. {
  17. mkdir -p /usr/etc/
  18. ln -sf /etc/openzwave /usr/etc/openzwave
  19. mkdir -p "${MOZIOT_HOME}/log"
  20. run_app &> "${MOZIOT_HOME}/log/run-app.log" &
  21. }