summaryrefslogtreecommitdiff
path: root/units
diff options
authorPMR <pmr@pmr-lander>2019-01-09 22:15:59 +0000
committerPMR <pmr@pmr-lander>2019-01-09 22:15:59 +0000
commita9ca90808e0313bf2bb906ccd67a85116780b48b (patch)
tree311ebe28995f001b8059c0e6875e915b262c718d /units
parent75b1e3702bee6bcb3782d833f35edf1c6a899075 (diff)
parentb8d8c2a9418eb75fa4362c743881502e5b252fd5 (diff)
Merge #361576 from ~jocave/plainbox-provider-checkbox:bluez-controller-detect
Diffstat (limited to 'units')
-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