Guest User

Untitled

a guest
Jun 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #! /bin/bash
  2. # /etc/init.d/garagerelay
  3.  
  4.  
  5. # Carry out specific functions when asked to by the system
  6. case "$1" in
  7. start)
  8. echo "Starting Relay"
  9. /usr/local/bin/gpio write 7 0
  10. /usr/local/bin/gpio mode 7 out
  11. /usr/local/bin/gpio write 0 0
  12. /usr/local/bin/gpio mode 0 out
  13. /home/pi/node/bin/node /home/pi/garage/server.js &
  14. ;;
  15. stop)
  16. echo "Stopping gpio"
  17. ;;
  18. *)
  19. echo "Usage: /etc/init.d/garagerelay {start|stop}"
  20. exit 1
  21. ;;
  22. esac
  23.  
  24. exit 0
Add Comment
Please, Sign In to add comment