Guest User

Untitled

a guest
Oct 23rd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. ### BEGIN INIT INFO
  2. # Provides: bluetooth-agent
  3. # Required-Start: $remote_fs $syslog bluetooth pulseaudio
  4. # Required-Stop: $remote_fs $syslog
  5. # Default-Start: 2 3 4 5
  6. # Default-Stop: 0 1 6
  7. # Short-Description: Makes Bluetooth discoverable and connectable to 0000
  8. # Description: Start Bluetooth-Agent at boot time.
  9. ### END INIT INFO
  10. #! /bin/sh
  11. # /etc/init.d/bluetooth-agent
  12. USER=root
  13. HOME=/root
  14. export USER HOME
  15. case "$1" in
  16. start)
  17. echo "setting bluetooth discoverable"
  18. sudo hciconfig hci0 piscan
  19. start-stop-daemon -S -x /usr/bin/bluetooth-agent -c pi -b -- 0000
  20. echo "bluetooth-agent startet pw: 0000"
  21. ;;
  22. stop)
  23. echo "Stopping bluetooth-agent"
  24. start-stop-daemon -K -x /usr/bin/bluetooth-agent
  25. ;;
  26. *)
  27. echo "Usage: /etc/init.d/bluetooth-agent {start|stop}"
  28. exit 1
  29. ;;
  30. esac
  31. exit 0
Add Comment
Please, Sign In to add comment