summaryrefslogtreecommitdiff
path: root/units/bluetooth
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2019-01-09 11:21:49 +0000
committerJonathan Cave <jonathan.cave@canonical.com>2019-01-09 14:02:21 +0000
commitb8d8c2a9418eb75fa4362c743881502e5b252fd5 (patch)
tree311ebe28995f001b8059c0e6875e915b262c718d /units/bluetooth
parent75b1e3702bee6bcb3782d833f35edf1c6a899075 (diff)
bluetooth: add bluez controller detect job
Diffstat (limited to 'units/bluetooth')
-rw-r--r--units/bluetooth/jobs.pxu16
1 files changed, 16 insertions, 0 deletions
diff --git a/units/bluetooth/jobs.pxu b/units/bluetooth/jobs.pxu
index 3b71e70..f40a6e0 100644
--- a/units/bluetooth/jobs.pxu
+++ b/units/bluetooth/jobs.pxu
@@ -10,6 +10,22 @@ flags: preserve-locale
requires: manifest.has_bt_adapter
imports: from com.canonical.plainbox import manifest
+id: bluetooth/bluez-controller-detect
+category_id: com.canonical.plainbox::bluetooth
+_summary: Check bluez lists a controller if rfkill detects one
+plugin: shell
+user: root
+depends: bluetooth/detect
+template-engine: jinja2
+requires:
+ package.name == 'bluez' or snap.name == 'bluez'
+ {%- if __on_ubuntucore__ %}
+ connections.slot == 'bluez:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:bluez'
+ {% endif -%}
+command:
+ bluez_list_adapters.py
+estimated_duration: 2s
+flags: preserve-locale
plugin: shell
category_id: com.canonical.plainbox::bluetooth