boot.sh 646 B

123456789101112131415161718192021
  1. #Stop the background process
  2. sudo systemctl daemon-reload
  3. sudo hciconfig hci0 down
  4. sudo /etc/init.d/bluetooth stop
  5. sudo systemctl stop bluetooth
  6. sudo hciconfig hci0 up
  7. # Update mac address
  8. ./updateMac.sh
  9. #Update Name
  10. ./updateName.sh ThanhLe_Keyboard
  11. #Get current Path
  12. export C_PATH=$(pwd)
  13. #Create Tmux session
  14. tmux has-session -t thanhle
  15. if [ $? != 0 ] ; then
  16. tmux new-session -s thanhle -n os -d
  17. tmux split-window -h -t thanhle
  18. tmux split-window -h -t thanhle
  19. tmux send-keys -t 0 'cd $C_PATH/server && sudo python btk_server.py ' C-m
  20. tmux send-keys -t 1 'cd $C_PATH/keyboard/ && sleep 5 && sudo python kb_client.py' C-m
  21. fi