mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
various fixes
This commit is contained in:
parent
79145916ae
commit
c8e14945fb
3 changed files with 34 additions and 1 deletions
|
@ -20,6 +20,17 @@
|
|||
- { src: 'bt-agent.service.j2', dest: '/etc/systemd/system/bt-agent.service' }
|
||||
- { src: 'bt-pan.service.j2', dest: '/etc/systemd/system/bt-pan.service' }
|
||||
- { src: 'bt-term.service.j2', dest: '/etc/systemd/system/bt-term.service' }
|
||||
- { src: 'network.conf.j2', dest: '/etc/bluetooth/network.conf' }
|
||||
|
||||
- name: Create bluetooth utility scripts
|
||||
template:
|
||||
backup: no
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
with_items:
|
||||
- { src: 'iiab-bt-pan-on.j2', dest: '/usr/bin/iiab-bt-pan-on' }
|
||||
- { src: 'iiab-bt-pan-off.j2', dest: '/usr/bin/iiab-bt-pan-off' }
|
||||
- { src: 'iiab-bt-term-on.j2', dest: '/usr/bin/iiab-bt-term-on' }
|
||||
|
@ -32,6 +43,19 @@
|
|||
regexp: '^ExecStart=/usr/lib/bluetooth/bluetoothd'
|
||||
line: 'ExecStart=/usr/lib/bluetooth/bluetoothd -C --noplugin=sap'
|
||||
|
||||
- name: Set discoverable not to timeout
|
||||
lineinfile:
|
||||
path: /etc/bluetooth/main.conf
|
||||
regexp: '^#DiscoverableTimeout'
|
||||
line: 'DiscoverableTimeout = 0'
|
||||
|
||||
- name: Enable & Restart 'bt-agent' service
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
name: bluetooth
|
||||
enabled: yes
|
||||
state: restarted
|
||||
|
||||
# enable or disable bt-agent
|
||||
- name: Enable & Restart 'bt-agent' service
|
||||
systemd:
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
systemctl disable bt-agent
|
||||
systemctl stop bt-agent
|
||||
# for some reason this service is really slow to stop and can't do anything without bt-pan
|
||||
#systemctl stop bt-agent
|
||||
|
||||
systemctl disable bt-pan
|
||||
systemctl stop bt-pan
|
||||
|
||||
bluetoothctl <<EOF
|
||||
discoverable off
|
||||
EOF
|
||||
|
|
|
@ -5,3 +5,7 @@ systemctl start bt-agent
|
|||
|
||||
systemctl enable bt-pan
|
||||
systemctl start bt-pan
|
||||
|
||||
bluetoothctl <<EOF
|
||||
discoverable on
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue